protected function Porter2::removeEnding in Search API 8
Removes a given string from the end of the current word.
Does not check whether the ending is actually there.
Parameters
string $string: The ending to remove.
8 calls to Porter2::removeEnding()
- Porter2::step0 in src/
Plugin/ search_api/ processor/ Resources/ Porter2.php - Searches for the longest among the "s" suffixes and removes it.
- Porter2::step1a in src/
Plugin/ search_api/ processor/ Resources/ Porter2.php - Handles various suffixes, of which the longest is replaced.
- Porter2::step1b in src/
Plugin/ search_api/ processor/ Resources/ Porter2.php - Handles various suffixes, of which the longest is replaced.
- Porter2::step1c in src/
Plugin/ search_api/ processor/ Resources/ Porter2.php - Replaces suffix y or Y with i if after non-vowel not @ word begin.
- Porter2::step2 in src/
Plugin/ search_api/ processor/ Resources/ Porter2.php - Implements step 2 of the Porter2 algorithm.
File
- src/
Plugin/ search_api/ processor/ Resources/ Porter2.php, line 598
Class
- Porter2
- Implements the Porter2 stemming algorithm.
Namespace
Drupal\search_api\Plugin\search_api\processor\ResourcesCode
protected function removeEnding($string) {
$this->word = substr($this->word, 0, -strlen($string));
}