C# Class Lucene.Net.Analysis.Fr.FrenchStemmer

显示文件 Open project: apache/lucenenet Class Usage Examples

Protected Methods

Method Description
Stem ( string term ) : string

Stems the given term to a unique discriminator.

Private Methods

Method Description
DeleteButSuffixFrom ( string source, string search, string prefix, bool without ) : void

Delete a suffix searched in zone "source" if preceded by the prefix

DeleteButSuffixFromElseReplace ( string source, string search, string prefix, bool without, string from, string replace ) : void

Delete a suffix searched in zone "source" if preceded by prefix
or replace it with the replace string if preceded by the prefix in the zone "from"
or delete the suffix if specified

DeleteFrom ( string source, string suffix ) : void

Delete a search string within the source zone

DeleteFromIfPrecededIn ( string source, string search, string from, string prefix ) : bool

Delete a suffix searched in zone "source" if zone "from" contains prefix + search string

DeleteFromIfTestVowelBeforeIn ( string source, string search, bool vowel, string from ) : bool

Delete a suffix searched in zone "source" if the preceding letter is (or isn't) a vowel

IsStemmable ( string term ) : bool

Checks a term if it can be processed correctly.

IsVowel ( char ch ) : bool

Test if a char is a french vowel, including accentuated ones

ReplaceFrom ( string source, string search, string replace ) : bool

Replace a search string with another within the source zone

RetrieveR ( StringBuilder buffer ) : string

Retrieve the "R zone" (1 or 2 depending on the buffer) and return the corresponding string
"R is the region after the first non-vowel following a vowel or is the null region at the end of the word if there is no such non-vowel"

RetrieveRV ( StringBuilder buffer ) : string

Retrieve the "RV zone" from a buffer an return the corresponding string
"If the word begins with two vowels, RV is the region after the third letter, otherwise the region after the first vowel not at the beginning of the word, or the end of the word if these positions cannot be found."

SetStrings ( ) : void

Sets the search region Strings
it needs to be done each time the buffer was modified

Step1 ( ) : void

First step of the Porter Algorithm
refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation

Step2a ( ) : bool

Second step (A) of the Porter Algorithm
Will be performed if nothing changed from the first step or changed were done in the amment, emment, ments or ment suffixes
refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation

Step2b ( ) : void

Second step (B) of the Porter Algorithm
Will be performed if step 2 A was performed unsuccessfully
refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation

Step3 ( ) : void

Third step of the Porter Algorithm
refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation

Step4 ( ) : void

Fourth step of the Porter Algorithm
refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation

Step5 ( ) : void

Fifth step of the Porter Algorithm
refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation

Step6 ( ) : void

Sixth (and last!) step of the Porter Algorithm
refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation

TreatVowels ( StringBuilder buffer ) : StringBuilder

Turns u and i preceded AND followed by a vowel to UpperCase
Turns y preceded OR followed by a vowel to UpperCase
Turns u preceded by q to UpperCase

Method Details

Stem() protected method

Stems the given term to a unique discriminator.
protected Stem ( string term ) : string
term string java.langString The term that should be stemmed
return string