Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class EdgeNGramTokenFilter

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

    This Lucene.Net.Analysis.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
    Lucene.Net.Util.AttributeSource
    Lucene.Net.Analysis.TokenStream
    Lucene.Net.Analysis.TokenFilter
    EdgeNGramTokenFilter
    Implements
    System.IDisposable
    Inherited Members
    Lucene.Net.Analysis.TokenFilter.m_input
    Lucene.Net.Analysis.TokenFilter.End()
    TokenFilter.Dispose(Boolean)
    Lucene.Net.Analysis.TokenStream.Dispose()
    Lucene.Net.Util.AttributeSource.GetAttributeFactory()
    Lucene.Net.Util.AttributeSource.GetAttributeClassesEnumerator()
    Lucene.Net.Util.AttributeSource.GetAttributeImplsEnumerator()
    Lucene.Net.Util.AttributeSource.AddAttributeImpl(Lucene.Net.Util.Attribute)
    Lucene.Net.Util.AttributeSource.AddAttribute<T>()
    Lucene.Net.Util.AttributeSource.HasAttributes
    Lucene.Net.Util.AttributeSource.HasAttribute<T>()
    Lucene.Net.Util.AttributeSource.GetAttribute<T>()
    Lucene.Net.Util.AttributeSource.ClearAttributes()
    Lucene.Net.Util.AttributeSource.CaptureState()
    Lucene.Net.Util.AttributeSource.RestoreState(Lucene.Net.Util.AttributeSource.State)
    Lucene.Net.Util.AttributeSource.GetHashCode()
    AttributeSource.Equals(Object)
    AttributeSource.ReflectAsString(Boolean)
    Lucene.Net.Util.AttributeSource.ReflectWith(Lucene.Net.Util.IAttributeReflector)
    Lucene.Net.Util.AttributeSource.CloneAttributes()
    Lucene.Net.Util.AttributeSource.CopyTo(Lucene.Net.Util.AttributeSource)
    Lucene.Net.Util.AttributeSource.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    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
    [Obsolete]
    public EdgeNGramTokenFilter(LuceneVersion version, TokenStream input, EdgeNGramTokenFilter.Side side, int minGram, int maxGram)
    Parameters
    Type Name Description
    Lucene.Net.Util.LuceneVersion version

    the Lucene match version - See Lucene.Net.Util.LuceneVersion

    Lucene.Net.Analysis.TokenStream input

    Lucene.Net.Analysis.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
    Lucene.Net.Util.LuceneVersion version

    the Lucene match version - See Lucene.Net.Util.LuceneVersion

    Lucene.Net.Analysis.TokenStream input

    Lucene.Net.Analysis.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
    [Obsolete]
    public EdgeNGramTokenFilter(LuceneVersion version, TokenStream input, string sideLabel, int minGram, int maxGram)
    Parameters
    Type Name Description
    Lucene.Net.Util.LuceneVersion version

    the Lucene match version - See Lucene.Net.Util.LuceneVersion

    Lucene.Net.Analysis.TokenStream input

    Lucene.Net.Analysis.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 = 1
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    DEFAULT_MIN_GRAM_SIZE

    Declaration
    public const int DEFAULT_MIN_GRAM_SIZE = 1
    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
    Lucene.Net.Analysis.TokenStream.IncrementToken()
    | Improve this Doc View Source

    Reset()

    Declaration
    public override void Reset()
    Overrides
    Lucene.Net.Analysis.TokenFilter.Reset()

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.