C# Class NClassifier.PorterStemmer

Stemmer, implementing the Porter Stemming algorithm
Mostra file Open project: colin-dumitru/Proiect-AI-2012---GUI

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() to stem the word.

PorterStemmer ( ) : System
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 the ResultBuffer and ResultLength properties (which is generally more efficient).

stem ( ) : void

Private Methods

Method Description
Cons ( int i ) : bool
Cvc ( int i ) : bool
DoubleC ( int j ) : bool
End ( string s ) : bool
M ( ) : int

Measures the number of consonant sequences between 0 and j. If c is a consonant sequence and v a vowel sequence, and <..> indicates arbitrary presence, gives 0 vc gives 1 vCvc gives 2 vCvcvc gives 3 ....

Step1 ( ) : void
Step2 ( ) : void
Step3 ( ) : void
Step4 ( ) : void
Step5 ( ) : void
Step6 ( ) : void
VowelInStem ( ) : bool
r ( string s ) : void
setto ( 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() to stem the word.
public Add ( char ch ) : void
ch char
return void

PorterStemmer() public method

public PorterStemmer ( ) : System
return System

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 the ResultBuffer and ResultLength properties (which is generally more efficient).
public ToString ( ) : string
return string

stem() public method

public stem ( ) : void
return void