function porterstemmer_exception2 in Porter-Stemmer 6.2
Same name and namespace in other branches
- 7 includes/standard-stemmer.inc \porterstemmer_exception2()
Checks exceptions for Porter Stemmer after Step 1a.
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_exception2()
- porterstemmer_stem in ./
porterstemmer.module - Stems a word, using the Porter Stemmer 2 algorithm.
File
- ./
porterstemmer.module, line 738 - 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_exception2(&$word) {
// The following words are to be left invariant.
$repl = array(
'inning' => 1,
'outing' => 1,
'canning' => 1,
'herring' => 1,
'earring' => 1,
'proceed' => 1,
'exceed' => 1,
'succeed' => 1,
);
if (isset($repl[$word])) {
return TRUE;
}
return FALSE;
}