Class ICUTransformFilter
A TokenFilter that transforms text with ICU.
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.Icu
Assembly: Lucene.Net.ICU.dll
Syntax
public sealed class ICUTransformFilter : TokenFilter, IDisposable
Remarks
ICU provides text-transformation functionality via its Transliteration API. Although script conversion is its most common use, a Transliterator can actually perform a more general class of tasks. In fact, Transliterator defines a very general API which specifies only that a segment of the input text is replaced by new text. The particulars of this conversion are determined entirely by subclasses of Transliterator.
Some useful transformations for search are built-in:
- Conversion from Traditional to Simplified Chinese characters
- Conversion from Hiragana to Katakana
- Conversion from Fullwidth to Halfwidth forms.
- Script conversions, for example Serbian Cyrillic to Latin
Example usage:
stream = new ICUTransformFilter(stream, Transliterator.GetInstance("Traditional-Simplified"));
For more details, see the ICU User Guide.
Constructors
| Improve this Doc View SourceICUTransformFilter(TokenStream, Transliterator)
Create a new ICUTransformFilter that transforms text on the given stream.
Declaration
public ICUTransformFilter(TokenStream input, Transliterator transform)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | input | TokenStream to filter. |
ICU4N.Text.Transliterator | transform | Transliterator to transform the text. |
Methods
| Improve this Doc View SourceIncrementToken()
Declaration
public override bool IncrementToken()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Implements
System.IDisposable