开发者

Lucene - Which analyzer to use to avoid prepositions

开发者 https://www.devze.com 2023-02-20 03:57 出处:网络
I am using the Lucene standard analyzer to parse text. however, it is returning prepositions as well as words like \"i\", \"the\", \"and\" etc...

I am using the Lucene standard analyzer to parse text. however, it is returning prepositions as well as words like "i", "the", "and" etc... Is there an Analy开发者_如何学Gozer I can use that will not return these words?

Thanks


StandardAnalyzer uses StopFilter.

By default the words in the STOP_WORDS_SET are excluded. If this is not sufficient, there are constructors which allow you to pass in a list of stop words which should be removed from the token stream. You can provide the list using a File, a Set, or a Reader.

0

精彩评论

暂无评论...
验证码 换一张
取 消