Class HunspellStemFilter
Lucene.Net.Analysis.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 Lucene.Net.Analysis.TokenAttributes.KeywordAttribute. To prevent
certain terms from being passed to the stemmer
IsKeyword should be set to true
in a previous Lucene.Net.Analysis.TokenStream.
Note: For including the original term as well as the stemmed version, see
KeywordRepeatFilterFactory
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
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 |
---|---|---|
Lucene.Net.Analysis.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 |
---|---|---|
Lucene.Net.Analysis.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 Lucene.Net.Analysis.TokenStream using affix rules in the provided Dictionary
Declaration
public HunspellStemFilter(TokenStream input, Dictionary dictionary, bool dedup, bool longestOnly)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Analysis.TokenStream | input | Lucene.Net.Analysis.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
Reset()
Declaration
public override void Reset()