You are here

protected function SnowballStemmer::stem in Snowball Stemmer 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/search_api/processor/SnowballStemmer.php \Drupal\snowball_stemmer\Plugin\search_api\processor\SnowballStemmer::stem()

Actually stem word, if required.

1 call to SnowballStemmer::stem()
SnowballStemmer::process in src/Plugin/search_api/processor/SnowballStemmer.php

File

src/Plugin/search_api/processor/SnowballStemmer.php, line 158

Class

SnowballStemmer
Stems search terms.

Namespace

Drupal\snowball_stemmer\Plugin\search_api\processor

Code

protected function stem($word) {
  if (strlen($word)) {
    $word = $this
      ->getStemmer()
      ->stem($word);
  }
  return $word;
}