Exemple #1
0
 public StopAnalyzer(System.IO.TextReader stopwords, bool enablePositionIncrements)
 {
     stopWords = WordlistLoader.GetWordSet(stopwords);
     this.enablePositionIncrements   = enablePositionIncrements;
     useDefaultStopPositionIncrement = false;
 }
Exemple #2
0
 /// <summary>Builds an analyzer with the stop words from the given reader. </summary>
 /// <seealso cref="WordlistLoader.GetWordSet(Reader)">
 /// </seealso>
 /// <param name="matchVersion">See <a href="#Version">above</a>
 /// </param>
 /// <param name="stopwords">Reader to load stop words from
 /// </param>
 public StopAnalyzer(Version matchVersion, System.IO.TextReader stopwords)
 {
     stopWords = WordlistLoader.GetWordSet(stopwords);
     this.enablePositionIncrements   = StopFilter.GetEnablePositionIncrementsVersionDefault(matchVersion);
     useDefaultStopPositionIncrement = false;
 }
Exemple #3
0
 public StopAnalyzer(System.IO.FileInfo stopwordsFile)
 {
     stopWords = WordlistLoader.GetWordSet(stopwordsFile);
     useDefaultStopPositionIncrement = true;
     enablePositionIncrements        = false;
 }