Lucene的StopFilter默认使用哪些停用词列表?

25
1个回答

47

StandardAnalyzerEnglishAnalyzer中默认的停用词集来自于StopAnalyzer.ENGLISH_STOP_WORDS_SET,在源文件中可以找到相关信息。

"a", "an", "and", "are", "as", "at", "be", "but", "by",
"for", "if", "in", "into", "is", "it",
"no", "not", "of", "on", "or", "such",
"that", "the", "their", "then", "there", "these",
"they", "this", "to", "was", "will", "with"

StopFilter本身没有定义默认的停用词集。


1
我正在使用 Lucene 5.5.0 进行关键词提取。我使用 tokenStream = new StopFilter(new ClassicFilter(new LowerCaseFilter(stdToken)), StopAnalyzer.ENGLISH_STOP_WORDS_SET); 指定停用词过滤器,但是 Lucene 并没有过滤停用词。我是否遗漏了什么? - Mike

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接