Class | Ferret::Analysis::StopFilter |
In: |
ext/r_analysis.c
|
Parent: | Ferret::Analysis::TokenStream |
A StopFilter filters *stop-words* from a TokenStream. Stop-words are words that you don‘t wish to be index. Usually they will be common words like "the" and "and" although you can specify whichever words you want.
["the", "pig", "and", "whistle"] => ["pig", "whistle"]
Create an StopFilter which removes *stop-words* from a TokenStream. You can optionally specify the stopwords you wish to have removed.
token_stream: | TokenStream to be filtered |
stop_words: | Array of *stop-words* you wish to be filtered out. This defaults to a list of English stop-words. The Ferret::Analysis contains a number of stop-word lists. |