Class MockTokenFilter
A TokenFilter for testing that removes terms accepted by a DFA.
- Union a list of singletons to act like a StopFilter.
- Use the complement to act like a KeepWordFilter.
- Use a regex like
.{12,}
to act like a LengthFilter.
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Analysis
Assembly: Lucene.Net.TestFramework.dll
Syntax
public sealed class MockTokenFilter : TokenFilter, IDisposable
Constructors
| Improve this Doc View SourceMockTokenFilter(TokenStream, CharacterRunAutomaton)
Create a new MockTokenFilter.
Declaration
public MockTokenFilter(TokenStream input, CharacterRunAutomaton filter)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input | TokenStream to filter |
CharacterRunAutomaton | filter | DFA representing the terms that should be removed. |
Fields
| Improve this Doc View SourceEMPTY_STOPSET
Empty set of stopwords
Declaration
public static readonly CharacterRunAutomaton EMPTY_STOPSET
Field Value
Type | Description |
---|---|
CharacterRunAutomaton |
ENGLISH_STOPSET
Set of common english stopwords
Declaration
public static readonly CharacterRunAutomaton ENGLISH_STOPSET
Field Value
Type | Description |
---|---|
CharacterRunAutomaton |
Methods
| Improve this Doc View SourceEnd()
Declaration
public override void End()
Overrides
| 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()
Overrides
Implements
System.IDisposable