function stem in Porter-Stemmer 5
Same name and namespace in other branches
- 6 porterstemmer.module \stem()
Stems a word. Simple huh?
Parameters
string $word Word to stem:
Return value
string Stemmed word
File
- ./
porterstemmer.module, line 58
Code
function stem($word) {
if (strlen($word) <= 2) {
return $word;
}
$word = step1ab($word);
$word = step1c($word);
$word = step2($word);
$word = step3($word);
$word = step4($word);
$word = step5($word);
return $word;
}