예제 #1
0
 /// <summary>
 /// Builds an analyzer with the given stop words. If a non-empty stem exclusion set is
 /// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
 /// stemming.
 /// </summary>
 /// <param name="matchVersion"> lucene compatibility version </param>
 /// <param name="stopwords"> a stopword set </param>
 /// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
 public FinnishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
     : base(matchVersion, stopwords)
 {
     this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionSet));
 }
예제 #2
0
 /// <summary>
 /// Creates a new instance initialized with the given stopword set
 /// </summary>
 /// <param name="version">
 ///          the Lucene version for cross version compatibility </param>
 /// <param name="stopwords">
 ///          the analyzer's stopword set </param>
 protected StopwordAnalyzerBase(LuceneVersion version, CharArraySet stopwords)
 {
     m_matchVersion = version;
     // analyzers should use char array set for stopwords!
     this.m_stopwords = stopwords == null ? CharArraySet.EMPTY_SET : CharArraySet.UnmodifiableSet(CharArraySet.Copy(version, stopwords));
 }
예제 #3
0
 /// <summary>
 /// Builds an analyzer with the given stop words and stemming exclusion words
 /// </summary>
 /// <param name="matchVersion">
 ///          lucene compatibility version </param>
 /// <param name="stopwords">
 ///          a stopword set </param>
 /// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
 public BrazilianAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
     : this(matchVersion, stopwords)
 {
     excltable = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionSet));
 }
예제 #4
0
 /// <summary>
 /// Builds an analyzer with the given stop words
 /// </summary>
 /// <param name="matchVersion">
 ///          lucene compatibility version </param>
 /// <param name="stopwords">
 ///          a stopword set </param>
 /// <param name="stemExclutionSet">
 ///          a stemming exclusion set </param>
 public FrenchAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclutionSet)
     : base(matchVersion, stopwords)
 {
     this.excltable = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclutionSet));
 }
예제 #5
0
 /// <summary>
 /// Builds the named analyzer with the given stop words. </summary>
 public SnowballAnalyzer(LuceneVersion matchVersion, string name, CharArraySet stopWords) : this(matchVersion, name)
 {
     stopSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stopWords));
 }
예제 #6
0
 /// <summary>
 /// Builds an analyzer with the given stop words and a set of work to be
 /// excluded from the <see cref="CzechStemFilter"/>.
 /// </summary>
 /// <param name="matchVersion"> <see cref="LuceneVersion"/> to match </param>
 /// <param name="stopwords"> a stopword set </param>
 /// <param name="stemExclusionTable"> a stemming exclusion set </param>
 public CzechAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionTable)
     : base(matchVersion, stopwords)
 {
     this.stemExclusionTable = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionTable));
 }
예제 #7
0
 /*
  * Builds an analyzer with the given stop words and stemming exclusion words
  *
  * @param matchVersion
  *          lucene compatibility version
  * @param stopwords
  *          a stopword set
  */
 public CzechAnalyzer(Version matchVersion, ISet <string> stopwords)
 {
     this.matchVersion = matchVersion;
     this.stoptable    = CharArraySet.UnmodifiableSet(CharArraySet.Copy(stopwords));
 }
 /// <summary>
 /// Builds an analyzer with the given stop words. If a non-empty stem exclusion set is
 /// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
 /// stemming.
 /// </summary>
 /// <param name="matchVersion"><see cref="LuceneVersion"/> to match.</param>
 /// <param name="stopwords">A stopword set.</param>
 /// <param name="stemExclusionSet">A set of terms not to be stemmed.</param>
 public UkrainianMorfologikAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
     : base(matchVersion, stopwords)
 {
     this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionSet));
 }