/// <summary> /// Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using /// affix rules in the provided HunspellDictionary. /// </summary> /// <param name="input">TokenStream whose tokens will be stemmed.</param> /// <param name="dictionary">HunspellDictionary containing the affix rules and words that will be used to stem the tokens.</param> /// <param name="dedup">true if only unique terms should be output.</param> public HunspellStemFilter(TokenStream input, HunspellDictionary dictionary, Boolean dedup = true) : base(input) { _posIncAtt = (PositionIncrementAttribute)AddAttribute(typeof(PositionIncrementAttribute)); _termAtt = (TermAttribute)AddAttribute(typeof(TermAttribute)); _dedup = dedup; _stemmer = new HunspellStemmer(dictionary); }
/// <summary> /// Constructs a new HunspellStemmer which will use the provided HunspellDictionary /// to create its stems. /// </summary> /// <param name="dictionary">HunspellDictionary that will be used to create the stems.</param> public HunspellStemmer(HunspellDictionary dictionary) { if (dictionary == null) { throw new ArgumentNullException("dictionary"); } _dictionary = dictionary; }
/// <summary> /// Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using /// affix rules in the provided HunspellDictionary. /// </summary> /// <param name="input">TokenStream whose tokens will be stemmed.</param> /// <param name="dictionary">HunspellDictionary containing the affix rules and words that will be used to stem the tokens.</param> /// <param name="dedup">true if only unique terms should be output.</param> public HunspellStemFilter(TokenStream input, HunspellDictionary dictionary, Boolean dedup = true) : base(input) { _posIncAtt = AddAttribute <IPositionIncrementAttribute>(); _termAtt = AddAttribute <ITermAttribute>(); _dedup = dedup; _stemmer = new HunspellStemmer(dictionary); _slovakStemmer = new SlovakStemmer(); }
public DutchAnalyzer() { _dictionary = HunspellDictionaryLoader.Dictionary("nl_NL"); }
/// <summary> /// Constructs a new HunspellStemmer which will use the provided HunspellDictionary /// to create its stems. /// </summary> /// <param name="dictionary">HunspellDictionary that will be used to create the stems.</param> public HunspellStemmer(HunspellDictionary dictionary) { if (dictionary == null) throw new ArgumentNullException("dictionary"); _dictionary = dictionary; }