C# Class Lucene.Net.Analysis.En.PorterStemmer

Stemmer, implementing the Porter Stemming Algorithm The Stemmer class transforms a word into its root form. The input word can be provided a character at time (by calling add()), or at once by calling one of the various stem(something) methods.
ファイルを表示 Open project: apache/lucenenet

Public Methods

Method Description
Add ( char ch ) : void

Add a character to the word being stemmed. When you are finished adding characters, you can call stem(void) to process the word.

PorterStemmer ( ) : Lucene.Net.Util
Reset ( ) : void

reset() resets the stemmer so it can stem another word. If you invoke the stemmer by calling add(char) and then stem(), you must call reset() before starting another word.

Stem ( ) : bool

Stem the word placed into the Stemmer buffer through calls to add(). Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().

Stem ( char word ) : bool

Stem a word contained in a char[]. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().

Stem ( char word, int wordLen ) : bool

Stem a word contained in a leading portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().

Stem ( char wordBuffer, int offset, int wordLen ) : bool

Stem a word contained in a portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().

Stem ( int i0 ) : bool
Stem ( string s ) : string

Stem a word provided as a String. Returns the result as a String.

ToString ( ) : string

After a word has been stemmed, it can be retrieved by toString(), or a reference to the internal buffer can be retrieved by getResultBuffer and getResultLength (which is generally more efficient.)

Private Methods

Method Description
Cons ( int i ) : bool
Cvc ( int i ) : bool
DoubleC ( int j ) : bool
Ends ( string s ) : bool
M ( ) : int
SetTo ( string s ) : void
Step1 ( ) : void
Step2 ( ) : void
Step3 ( ) : void
Step4 ( ) : void
Step5 ( ) : void
Step6 ( ) : void
VowelInStem ( ) : bool
r ( string s ) : void

Method Details

Add() public method

Add a character to the word being stemmed. When you are finished adding characters, you can call stem(void) to process the word.
public Add ( char ch ) : void
ch char
return void

PorterStemmer() public method

public PorterStemmer ( ) : Lucene.Net.Util
return Lucene.Net.Util

Reset() public method

reset() resets the stemmer so it can stem another word. If you invoke the stemmer by calling add(char) and then stem(), you must call reset() before starting another word.
public Reset ( ) : void
return void

Stem() public method

Stem the word placed into the Stemmer buffer through calls to add(). Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().
public Stem ( ) : bool
return bool

Stem() public method

Stem a word contained in a char[]. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().
public Stem ( char word ) : bool
word char
return bool

Stem() public method

Stem a word contained in a leading portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().
public Stem ( char word, int wordLen ) : bool
word char
wordLen int
return bool

Stem() public method

Stem a word contained in a portion of a char[] array. Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString().
public Stem ( char wordBuffer, int offset, int wordLen ) : bool
wordBuffer char
offset int
wordLen int
return bool

Stem() public method

public Stem ( int i0 ) : bool
i0 int
return bool

Stem() public method

Stem a word provided as a String. Returns the result as a String.
public Stem ( string s ) : string
s string
return string

ToString() public method

After a word has been stemmed, it can be retrieved by toString(), or a reference to the internal buffer can be retrieved by getResultBuffer and getResultLength (which is generally more efficient.)
public ToString ( ) : string
return string