PHP5 Implementation of the Porter Stemmer algorithm. Certain elements were borrowed from the (broken) implementation by Jon Abernathy.
Usage:
$stem = PorterStemmer::Stem($word);
How easy is that?
Located in /lib/utilities/class.porterstemmer.php (line 21)
Checks for ending CVC sequence where second C is not W, X or Y
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.
What, you mean it's not obvious from the name?
m() measures the number of consonant sequences in $str. if c is a consonant sequence and v a vowel sequence, and <..> indicates arbitrary presence,
<c><v> gives 0 <c>vc<v> gives 1 <c>vcvc<v> gives 2 <c>vcvcvc<v> gives 3
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.
Stems a word. Simple huh?
Documentation generated on Sun, 13 Dec 2009 19:39:33 +0000 by phpDocumentor 1.4.3