Class HunspellStemFilter
TokenFilter that uses hunspell affix rules and words to stem tokens.
Since hunspell supports a word having multiple stems, this filter can emit
multiple tokens for each consumed token
Note: This filter is aware of the KeywordAttribute. To prevent
certain terms from being passed to the stemmer
IsKeyword should be set to true
in a previous TokenStream.
Note: For including the original term as well as the stemmed version, see
KeywordRepeatFilterFactory
Implements
Inherited Members
Namespace: Lucene.Net.Analysis.Hunspell
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class HunspellStemFilter : TokenFilter, IDisposable
Constructors
| Improve this Doc View SourceHunspellStemFilter(TokenStream, Dictionary)
Create a HunspellStemFilter outputting all possible stems.
Declaration
public HunspellStemFilter(TokenStream input, Dictionary dictionary)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input | |
Dictionary | dictionary |
See Also
| Improve this Doc View SourceHunspellStemFilter(TokenStream, Dictionary, Boolean)
Create a HunspellStemFilter outputting all possible stems.
Declaration
public HunspellStemFilter(TokenStream input, Dictionary dictionary, bool dedup)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input | |
Dictionary | dictionary | |
System.Boolean | dedup |
See Also
| Improve this Doc View SourceHunspellStemFilter(TokenStream, Dictionary, Boolean, Boolean)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided Dictionary
Declaration
public HunspellStemFilter(TokenStream input, Dictionary dictionary, bool dedup, bool longestOnly)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input | TokenStream whose tokens will be stemmed |
Dictionary | dictionary | Hunspell Dictionary containing the affix rules and words that will be used to stem the tokens |
System.Boolean | dedup | remove duplicates |
System.Boolean | longestOnly | true if only the longest term should be output. |
Methods
| Improve this Doc View SourceIncrementToken()
Declaration
public override bool IncrementToken()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceReset()
Declaration
public override void Reset()