PHP Class TeamTNT\TNTSearch\Stemmer\PorterStemmer

Usage: $stem = PorterStemmer::Stem($word); How easy is that?
Inheritance: implements TeamTNT\TNTSearch\Stemmer\Stemmer
Mostrar archivo Open project: teamtnt/tntsearch Class Usage Examples

Public Methods

Method Description
stem ( string $word ) : string Stems a word. Simple huh?

Private Methods

Method Description
cvc ( string $str ) : boolean Checks for ending CVC sequence where second C is not W, X or Y
doPartA ( string $word )
doPartB ( $word )
doubleConsonant ( string $str ) : boolean Returns true/false as to whether the given string contains two of the same consonant next to each other at the end of the string.
m ( string $str ) : integer What, you mean it's not obvious from the name?
replace ( string &$str, string $check, string $repl, integer $m = null ) : boolean Replaces the first string with the second, at the end of the string. If third arg is given, then the preceding string must match that m count at least.
step1ab ( string $word ) : string Step 1
step1c ( string $word ) Step 1c
step2 ( string $word ) Step 2
step3 ( string $word ) Step 3
step4 ( string $word ) Step 4
step5 ( string $word ) Step 5

Method Details

stem() public static method

Stems a word. Simple huh?
public static stem ( string $word ) : string
$word string Word to stem
return string Stemmed word