C# Class Lucene.Net.Analysis.Util.TokenizerFactory

Abstract parent class for analysis factories that create Tokenizer instances.
Inheritance: AbstractAnalysisFactory
Mostra file Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
Create ( Lucene.Net.Util.AttributeSource factory, TextReader input ) : Tokenizer

Creates a TokenStream of the specified input using the given AttributeFactory

Create ( TextReader input ) : Tokenizer

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

ForName ( string name, string>.IDictionary args ) : TokenizerFactory

looks up a tokenizer by name from context classpath

LookupClass ( string name ) : Type

looks up a tokenizer class by name from context classpath

ReloadTokenizers ( ) : void

Reloads the factory list from the given ClassLoader. 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!

Protected Methods

Method Description
TokenizerFactory ( string>.IDictionary args ) : System

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

Method Details

Create() public abstract method

Creates a TokenStream of the specified input using the given AttributeFactory
public abstract Create ( Lucene.Net.Util.AttributeSource factory, TextReader input ) : Tokenizer
factory Lucene.Net.Util.AttributeSource
input System.IO.TextReader
return Tokenizer

Create() public method

Creates a TokenStream of the specified input using the default attribute factory.
public Create ( TextReader input ) : Tokenizer
input System.IO.TextReader
return Tokenizer

ForName() public static method

looks up a tokenizer by name from context classpath
public static ForName ( string name, string>.IDictionary args ) : TokenizerFactory
name string
args string>.IDictionary
return TokenizerFactory

LookupClass() public static method

looks up a tokenizer class by name from context classpath
public static LookupClass ( string name ) : Type
name string
return System.Type

ReloadTokenizers() public static method

Reloads the factory list from the given ClassLoader. 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!

public static ReloadTokenizers ( ) : void
return void

TokenizerFactory() protected method

Initialize this factory via a set of key-value pairs.
protected TokenizerFactory ( string>.IDictionary args ) : System
args string>.IDictionary
return System