Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class TokenizerFactory

    Abstract parent class for analysis factories that create Lucene.Net.Analysis.Tokenizer instances.

    Inheritance
    object
    AbstractAnalysisFactory
    TokenizerFactory
    ArabicLetterTokenizerFactory
    CJKTokenizerFactory
    ChineseTokenizerFactory
    KeywordTokenizerFactory
    LetterTokenizerFactory
    LowerCaseTokenizerFactory
    WhitespaceTokenizerFactory
    EdgeNGramTokenizerFactory
    NGramTokenizerFactory
    PathHierarchyTokenizerFactory
    PatternTokenizerFactory
    RussianLetterTokenizerFactory
    ClassicTokenizerFactory
    StandardTokenizerFactory
    UAX29URLEmailTokenizerFactory
    WikipediaTokenizerFactory
    Inherited Members
    AbstractAnalysisFactory.LUCENE_MATCH_VERSION_PARAM
    AbstractAnalysisFactory.m_luceneMatchVersion
    AbstractAnalysisFactory.OriginalArgs
    AbstractAnalysisFactory.AssureMatchVersion()
    AbstractAnalysisFactory.LuceneMatchVersion
    AbstractAnalysisFactory.Require(IDictionary<string, string>, string)
    AbstractAnalysisFactory.Require(IDictionary<string, string>, string, ICollection<string>)
    AbstractAnalysisFactory.Require(IDictionary<string, string>, string, ICollection<string>, bool)
    AbstractAnalysisFactory.Get(IDictionary<string, string>, string, string)
    AbstractAnalysisFactory.Get(IDictionary<string, string>, string, ICollection<string>)
    AbstractAnalysisFactory.Get(IDictionary<string, string>, string, ICollection<string>, string)
    AbstractAnalysisFactory.Get(IDictionary<string, string>, string, ICollection<string>, string, bool)
    AbstractAnalysisFactory.RequireInt32(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetInt32(IDictionary<string, string>, string, int)
    AbstractAnalysisFactory.RequireBoolean(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetBoolean(IDictionary<string, string>, string, bool)
    AbstractAnalysisFactory.RequireSingle(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetSingle(IDictionary<string, string>, string, float)
    AbstractAnalysisFactory.RequireChar(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetChar(IDictionary<string, string>, string, char)
    AbstractAnalysisFactory.GetSet(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetPattern(IDictionary<string, string>, string)
    AbstractAnalysisFactory.GetCulture(IDictionary<string, string>, string, CultureInfo)
    AbstractAnalysisFactory.GetWordSet(IResourceLoader, string, bool)
    AbstractAnalysisFactory.GetLines(IResourceLoader, string)
    AbstractAnalysisFactory.GetSnowballWordSet(IResourceLoader, string, bool)
    AbstractAnalysisFactory.SplitFileNames(string)
    AbstractAnalysisFactory.GetClassArg()
    AbstractAnalysisFactory.IsExplicitLuceneMatchVersion
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Analysis.Util
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public abstract class TokenizerFactory : AbstractAnalysisFactory

    Constructors

    TokenizerFactory(IDictionary<string, string>)

    Initialize this factory via a set of key-value pairs.

    Declaration
    protected TokenizerFactory(IDictionary<string, string> args)
    Parameters
    Type Name Description
    IDictionary<string, string> args

    Properties

    AvailableTokenizers

    returns a list of all available tokenizer names from the host project's referenced assemblies

    Declaration
    public static ICollection<string> AvailableTokenizers { get; }
    Property Value
    Type Description
    ICollection<string>

    Methods

    Create(AttributeFactory, TextReader)

    Creates a Lucene.Net.Analysis.TokenStream of the specified input using the given Lucene.Net.Util.AttributeSource.AttributeFactory

    Declaration
    public abstract Tokenizer Create(AttributeSource.AttributeFactory factory, TextReader input)
    Parameters
    Type Name Description
    AttributeSource.AttributeFactory factory
    TextReader input
    Returns
    Type Description
    Tokenizer

    Create(TextReader)

    Creates a Lucene.Net.Analysis.TokenStream of the specified input using the default attribute factory.

    Declaration
    public Tokenizer Create(TextReader input)
    Parameters
    Type Name Description
    TextReader input
    Returns
    Type Description
    Tokenizer

    ForName(string, IDictionary<string, string>)

    looks up a tokenizer by name from the host project's referenced assemblies

    Declaration
    public static TokenizerFactory ForName(string name, IDictionary<string, string> args)
    Parameters
    Type Name Description
    string name
    IDictionary<string, string> args
    Returns
    Type Description
    TokenizerFactory

    LookupClass(string)

    looks up a tokenizer class by name from the host project's referenced assemblies

    Declaration
    public static Type LookupClass(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    Type

    ReloadTokenizers()

    Reloads the factory list. Changes to the factories are visible after the method ends, all iterators (AvailableTokenizers,...) stay consistent.

    NOTE: Only new factories are added, existing ones are never removed or replaced.

    This method is expensive and should only be called for discovery of new factories on the given classpath/classloader!

    Declaration
    public static void ReloadTokenizers()
    Back to top Copyright © 2024 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.