Show / Hide Table of Contents

    Class ICUTransformFilter

    A TokenFilter that transforms text with ICU.

    Inheritance
    System.Object
    AttributeSource
    TokenStream
    TokenFilter
    ICUTransformFilter
    Implements
    IDisposable
    Inherited Members
    TokenFilter.m_input
    TokenFilter.End()
    TokenFilter.Dispose(Boolean)
    TokenFilter.Reset()
    TokenStream.Dispose()
    AttributeSource.GetAttributeFactory()
    AttributeSource.GetAttributeClassesEnumerator()
    AttributeSource.GetAttributeImplsEnumerator()
    AttributeSource.AddAttributeImpl(Attribute)
    AttributeSource.AddAttribute<T>()
    AttributeSource.HasAttributes
    AttributeSource.HasAttribute<T>()
    AttributeSource.GetAttribute<T>()
    AttributeSource.ClearAttributes()
    AttributeSource.CaptureState()
    AttributeSource.RestoreState(AttributeSource.State)
    AttributeSource.GetHashCode()
    AttributeSource.Equals(Object)
    AttributeSource.ReflectAsString(Boolean)
    AttributeSource.ReflectWith(IAttributeReflector)
    AttributeSource.CloneAttributes()
    AttributeSource.CopyTo(AttributeSource)
    AttributeSource.ToString()
    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 Source

    ICUTransformFilter(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.

    Transliterator transform

    Transliterator to transform the text.

    Methods

    | Improve this Doc View Source

    IncrementToken()

    Declaration
    public override bool IncrementToken()
    Returns
    Type Description
    System.Boolean
    Overrides
    TokenStream.IncrementToken()

    Implements

    IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)