/** * Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided * Dictionary * * @param input TokenStream whose tokens will be stemmed * @param dictionary HunspellDictionary containing the affix rules and words that will be used to stem the tokens * @param longestOnly true if only the longest term should be output. */ public HunspellStemFilter(TokenStream input, Dictionary dictionary, boolean dedup, boolean longestOnly) { super(input); this.dedup = dedup && longestOnly == false; // don't waste time deduping if longestOnly is set this.stemmer = new Stemmer(dictionary); this.longestOnly = longestOnly; }
/** * Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided * Dictionary * * @param input TokenStream whose tokens will be stemmed * @param dictionary HunspellDictionary containing the affix rules and words that will be used to stem the tokens * @param longestOnly true if only the longest term should be output. */ public HunspellStemFilter(TokenStream input, Dictionary dictionary, boolean dedup, boolean longestOnly) { super(input); this.dedup = dedup && longestOnly == false; // don't waste time deduping if longestOnly is set this.stemmer = new Stemmer(dictionary); this.longestOnly = longestOnly; }