function porterstemmer_step0 in Porter-Stemmer 6.2
Same name and namespace in other branches
- 7 includes/standard-stemmer.inc \porterstemmer_step0()
Step 0 of the algorithm: remove possessive endings.
Parameters
$word: Word to stem, modified in place if successful.
Return value
TRUE if it is time to stop stemming, FALSE to continue.
1 call to porterstemmer_step0()
- porterstemmer_stem in ./
porterstemmer.module - Stems a word, using the Porter Stemmer 2 algorithm.
File
- ./
porterstemmer.module, line 413 - This is an implementation of the Porter 2 Stemming algorithm from http://snowball.tartarus.org/algorithms/english/stemmer.html by Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com
Code
function porterstemmer_step0(&$word) {
$tmp = $word;
$didit = FALSE;
porterstemmer_suffix($tmp, "'s'", '', $didit) or porterstemmer_suffix($tmp, "'s", '', $didit) or porterstemmer_suffix($tmp, "'", '', $didit);
return porterstemmer_step_ending($word, $tmp);
}