Show / Hide Table of Contents

    Class EdgeNGramTokenFilter

    Tokenizes the given token into n-grams of given size(s).

    This TokenFilter create n-grams from the beginning edge or ending edge of a input token.

    As of Lucene 4.4, this filter does not support BACK (you can use ReverseStringFilter up-front and afterward to get the same behavior), handles supplementary characters correctly and does not update offsets anymore.

    Inheritance
    System.Object
    AttributeSource
    TokenStream
    TokenFilter
    EdgeNGramTokenFilter
    Implements
    IDisposable
    Inherited Members
    TokenFilter.m_input
    TokenFilter.End()
    TokenFilter.Dispose(Boolean)
    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.NGram
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public sealed class EdgeNGramTokenFilter : TokenFilter, IDisposable

    Constructors

    | Improve this Doc View Source

    EdgeNGramTokenFilter(LuceneVersion, TokenStream, EdgeNGramTokenFilter.Side, Int32, Int32)

    Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range

    Declaration
    public EdgeNGramTokenFilter(LuceneVersion version, TokenStream input, EdgeNGramTokenFilter.Side side, int minGram, int maxGram)
    Parameters
    Type Name Description
    LuceneVersion version

    the Lucene match version - See LuceneVersion

    TokenStream input

    TokenStream holding the input to be tokenized

    EdgeNGramTokenFilter.Side side

    the EdgeNGramTokenFilter.Side from which to chop off an n-gram

    System.Int32 minGram

    the smallest n-gram to generate

    System.Int32 maxGram

    the largest n-gram to generate

    | Improve this Doc View Source

    EdgeNGramTokenFilter(LuceneVersion, TokenStream, Int32, Int32)

    Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range

    Declaration
    public EdgeNGramTokenFilter(LuceneVersion version, TokenStream input, int minGram, int maxGram)
    Parameters
    Type Name Description
    LuceneVersion version

    the Lucene match version - See LuceneVersion

    TokenStream input

    TokenStream holding the input to be tokenized

    System.Int32 minGram

    the smallest n-gram to generate

    System.Int32 maxGram

    the largest n-gram to generate

    | Improve this Doc View Source

    EdgeNGramTokenFilter(LuceneVersion, TokenStream, String, Int32, Int32)

    Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range

    Declaration
    public EdgeNGramTokenFilter(LuceneVersion version, TokenStream input, string sideLabel, int minGram, int maxGram)
    Parameters
    Type Name Description
    LuceneVersion version

    the Lucene match version - See LuceneVersion

    TokenStream input

    TokenStream holding the input to be tokenized

    System.String sideLabel

    the name of the EdgeNGramTokenFilter.Side from which to chop off an n-gram

    System.Int32 minGram

    the smallest n-gram to generate

    System.Int32 maxGram

    the largest n-gram to generate

    Fields

    | Improve this Doc View Source

    DEFAULT_MAX_GRAM_SIZE

    Declaration
    public const int DEFAULT_MAX_GRAM_SIZE = null
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    DEFAULT_MIN_GRAM_SIZE

    Declaration
    public const int DEFAULT_MIN_GRAM_SIZE = null
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    DEFAULT_SIDE

    Declaration
    public const EdgeNGramTokenFilter.Side DEFAULT_SIDE = EdgeNGramTokenFilter.Side.FRONT
    Field Value
    Type Description
    EdgeNGramTokenFilter.Side

    Methods

    | Improve this Doc View Source

    GetSide(String)

    Get the appropriate EdgeNGramTokenFilter.Side from a string

    Declaration
    public static EdgeNGramTokenFilter.Side GetSide(string sideName)
    Parameters
    Type Name Description
    System.String sideName
    Returns
    Type Description
    EdgeNGramTokenFilter.Side
    | Improve this Doc View Source

    IncrementToken()

    Declaration
    public override sealed bool IncrementToken()
    Returns
    Type Description
    System.Boolean
    Overrides
    TokenStream.IncrementToken()
    | Improve this Doc View Source

    Reset()

    Declaration
    public override void Reset()
    Overrides
    TokenFilter.Reset()

    Implements

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