Lucene.NET意大利语分析器:从文件系统加载停用词

时间:2013-04-15 14:28:20

标签: vb.net lucene.net analyzer stop-words

我在vb.net 3.5框架应用程序上使用Lucene.NET 3.0.3。我需要传递一个意大利语停止文件。

使用FileInfo或TextReader,一旦我以标准方式设置了我的分析器,我总会得到英文停用词:

            stopword = New System.IO.FileInfo(stopWordsLocation)
            analyzer = New StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30, stopword)
            analyzer = New StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30, stopword)
            'here i have still the English stop words if I go through quick-watch my analyzer

有人有线索吗?

1 个答案:

答案 0 :(得分:0)

您是否正在阅读静态字段STOP_WORDS_SET?如果您调用不带停止词列表的StandardAnalyzer构造函数,那么这就是使用的英语停用词列表。您的代码不使用该构造函数,因此不会导致任何问题。