开发者

Lucene - Which analyzer to use to avoid prepositions

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜