简体   繁体   中英

Lucene.NET Italian Analyzer: Loading Stopwords from file system

I am using Lucene.NET 3.0.3 on a vb.net 3.5 framework application. I need to pass an Italian stopword file.

Either using a FileInfo or a TextReader, I get always the English stop words, once I have instatiated my analyzer in a standard way:

            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

Does anybody have a clue?

Are you reading the static field STOP_WORDS_SET ? That's the list of english stopwords used if you call the StandardAnalyzer constructor which does not take a stop word list. Your code does not use that constructor, so it should not cause any issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM