protected function Porter2::step1c in Search API 8
Replaces suffix y or Y with i if after non-vowel not @ word begin.
Implements step 1c of the Porter2 algorithm.
1 call to Porter2::step1c()
- Porter2::stem in src/
Plugin/ search_api/ processor/ Resources/ Porter2.php - Computes the stem of the word.
File
- src/
Plugin/ search_api/ processor/ Resources/ Porter2.php, line 237
Class
- Porter2
- Implements the Porter2 stemming algorithm.
Namespace
Drupal\search_api\Plugin\search_api\processor\ResourcesCode
protected function step1c() {
if (($this
->hasEnding('y') || $this
->hasEnding('Y')) && $this
->length() > 2 && !$this
->isVowel($this
->length() - 2)) {
$this
->removeEnding('y');
$this
->addEnding('i');
}
}