You are here

protected function SnowballStemmer::stem in Snowball Stemmer 8

Same name and namespace in other branches
  1. 2.x 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
Processes a single string value.

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;
}