C# Class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer

Inheritance: Analyzer
Afficher le fichier Open project: paulirwin/lucene.net Class Usage Examples

Méthodes publiques

Свойство Type Description
DEFAULT_ANALYZER PatternAnalyzer
EXTENDED_ANALYZER PatternAnalyzer
NON_WORD_PATTERN Pattern
WHITESPACE_PATTERN Pattern

Méthodes publiques

Méthode Description
Equals ( object other ) : bool

Indicates whether some other object is "equal to" this one.

GetHashCode ( ) : int

Returns a hash code value for the object.

PatternAnalyzer ( System.Version matchVersion, Pattern pattern, bool toLowerCase, CharArraySet stopWords ) : System

Constructs a new instance with the given parameters.

createComponents ( string fieldName, Reader reader ) : TokenStreamComponents

Creates a token stream that tokenizes all the text in the given Reader; This implementation forwards to tokenStream(String, Reader, String) and is less efficient than tokenStream(String, Reader, String).

createComponents ( string fieldName, Reader reader, string text ) : TokenStreamComponents

Creates a token stream that tokenizes the given string into token terms (aka words).

Private Methods

Méthode Description
ToString ( Reader input ) : string

Reads until end-of-stream and returns all read chars, finally closes the stream.

eq ( object o1, object o2 ) : bool

equality where o1 and/or o2 can be null

eqPattern ( Pattern p1, Pattern p2 ) : bool

assumes p1 and p2 are not null

Method Details

Equals() public méthode

Indicates whether some other object is "equal to" this one.
public Equals ( object other ) : bool
other object /// the reference object with which to compare.
Résultat bool

GetHashCode() public méthode

Returns a hash code value for the object.
public GetHashCode ( ) : int
Résultat int

PatternAnalyzer() public méthode

Constructs a new instance with the given parameters.
public PatternAnalyzer ( System.Version matchVersion, Pattern pattern, bool toLowerCase, CharArraySet stopWords ) : System
matchVersion System.Version currently does nothing
pattern Pattern /// a regular expression delimiting tokens
toLowerCase bool /// if true returns tokens after applying /// String.toLowerCase()
stopWords CharArraySet /// if non-null, ignores all tokens that are contained in the /// given stop set (after previously having applied toLowerCase() /// if applicable). For example, created via /// and/or /// as in /// WordlistLoader.getWordSet(new File("samples/fulltext/stopwords.txt") /// or other stop words /// lists .
Résultat System

createComponents() public méthode

Creates a token stream that tokenizes all the text in the given Reader; This implementation forwards to tokenStream(String, Reader, String) and is less efficient than tokenStream(String, Reader, String).
public createComponents ( string fieldName, Reader reader ) : TokenStreamComponents
fieldName string /// the name of the field to tokenize (currently ignored).
reader Reader /// the reader delivering the text
Résultat TokenStreamComponents

createComponents() public méthode

Creates a token stream that tokenizes the given string into token terms (aka words).
public createComponents ( string fieldName, Reader reader, string text ) : TokenStreamComponents
fieldName string /// the name of the field to tokenize (currently ignored).
reader Reader /// reader (e.g. charfilter) of the original text. can be null.
text string /// the string to tokenize
Résultat TokenStreamComponents

Property Details

DEFAULT_ANALYZER public_oe static_oe property

A lower-casing word analyzer with English stop words (can be shared freely across threads without harm); global per class loader.
public static PatternAnalyzer,org.apache.lucene.analysis.miscellaneous DEFAULT_ANALYZER
Résultat PatternAnalyzer

EXTENDED_ANALYZER public_oe static_oe property

A lower-casing word analyzer with extended English stop words (can be shared freely across threads without harm); global per class loader. The stop words are borrowed from http://thomas.loc.gov/home/stopwords.html, see http://thomas.loc.gov/home/all.about.inquery.html
public static PatternAnalyzer,org.apache.lucene.analysis.miscellaneous EXTENDED_ANALYZER
Résultat PatternAnalyzer

NON_WORD_PATTERN public_oe static_oe property

"\\W+"; Divides text at non-letters (NOT Character.isLetter(c))
public static Pattern NON_WORD_PATTERN
Résultat Pattern

WHITESPACE_PATTERN public_oe static_oe property

"\\s+"; Divides text at whitespaces (Character.isWhitespace(c))
public static Pattern WHITESPACE_PATTERN
Résultat Pattern