protected function SearchApiPorter2::step1c in Search API 7
Replaces suffix y or Y with i if after non-vowel not @ word begin.
Implements step 1c of the Porter2 algorithm.
1 call to SearchApiPorter2::step1c()
- SearchApiPorter2::stem in includes/
processor_stemmer.inc - Computes the stem of the word.
File
- includes/
processor_stemmer.inc, line 320 - Contains SearchApiPorterStemmer and SearchApiPorter2.
Class
- SearchApiPorter2
- Implements the Porter2 stemming algorithm.
Code
protected function step1c() {
if (($this
->hasEnding('y') || $this
->hasEnding('Y')) && $this
->length() > 2 && !$this
->isVowel($this
->length() - 2)) {
$this
->removeEnding('y');
$this
->addEnding('i');
}
}