public function SnowballStemmer::getStemmer in Snowball Stemmer 8
Same name and namespace in other branches
- 2.x src/Plugin/search_api/processor/SnowballStemmer.php \Drupal\snowball_stemmer\Plugin\search_api\processor\SnowballStemmer::getStemmer()
Retrieves the stemmer service.
Return value
\Drupal\snowball_stemmer\Stemmer The stemmer service.
File
- src/
Plugin/ search_api/ processor/ SnowballStemmer.php, line 60
Class
- SnowballStemmer
- Stems search terms.
Namespace
Drupal\snowball_stemmer\Plugin\search_api\processorCode
public function getStemmer() {
$stemmer = $this->stemmer ?: \Drupal::service('snowball_stemmer.stemmer');
// @todo allow multilingual overrides.
$stemmer
->setOverrides($this->configuration['exceptions']);
return $stemmer;
}