rluiten/elm-text-search/4.0.0

NOTE: this package is not compatible with Elm 0.19.1

StopWordFilter

StopWordFilter is an English language stop word list filter, any words contained in the list are not stored in the index.

This is intended to be used in the ElmTextSearch token processing pipeline.

Things to know about stop word lists.

  • Words in document are split on white space to create tokens.
  • Tokens have non word characters from prefix and suffix to improve matching filters.
  • Input tokens to create stop word filters should be full words.
  • It is more efficient to merge all your stop words into a single stop word filter.

create default stop word filter func

createDefaultFilterFunc : FilterFactory doc

Default english stop word filter suitable for ElmTextSearch.

A default stop word english filter list

stopEnglishWordList : List String

Default english stop word list to create filter.

Create a custom stop word filter list

createFilterFuncWith : List String -> FilterFactory doc

Create stop word list filter suitable for ElmTextSearch, this versions extends the default word list with the extra words provided.

createFilterFunc : List String -> FilterFactory doc

Create stop word filter for provided list of tokens suitable for ElmTextSearch.

** This creates a stop world filter purely from your own word list, understand what you are doing and consequences if you use this. **

The FilterFunc created returns True to allow words into index. So words found in the stopWordList return False

Copyright (c) 2016-2017 Robin Luiten