【问题标题】:What is the default list of stopwords used in Lucene's StopFilter?Lucene 的 StopFilter 中使用的默认停用词列表是什么?
【发布时间】:2013-07-05 20:24:47
【问题描述】:

Lucene 有一个默认的停止过滤器 (http://lucene.apache.org/core/4_0_0/analyzers-common/org/apache/lucene/analysis/core/StopFilter.html),有谁知道列表中的单词是什么?

【问题讨论】:

    标签: java apache lucene information-retrieval stop-words


    【解决方案1】:

    StandardAnalyzerEnglishAnalyzer 中设置的 default stop words 来自 StopAnalyzer.ENGLISH_STOP_WORDS_SET,如在 source file 中找到的:

    "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 本身没有定义默认的停用词集。

    【讨论】:

    • 我正在使用Lucene 5.5.0 来获取关键字。我用tokenStream = new StopFilter(new ClassicFilter(new LowerCaseFilter(stdToken)), StopAnalyzer.ENGLISH_STOP_WORDS_SET); 指定停用词过滤器,但Lucene 不过滤停用词。有什么我想念的吗?
    猜你喜欢
    • 2016-07-14
    • 1970-01-01
    • 2015-05-08
    • 2021-01-27
    • 2016-06-08
    • 2011-09-22
    • 1970-01-01
    • 2023-03-29
    • 2017-04-04
    相关资源
    最近更新 更多