You are here

protected function Porter2::exceptions in Search API 8

Determines whether the word is contained in our list of exceptions.

If so, the $word property is changed to the stem listed in the exceptions.

Return value

bool TRUE if the word was an exception, FALSE otherwise.

1 call to Porter2::exceptions()
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 121

Class

Porter2
Implements the Porter2 stemming algorithm.

Namespace

Drupal\search_api\Plugin\search_api\processor\Resources

Code

protected function exceptions() {
  if (isset($this->exceptions[$this->word])) {
    $this->word = $this->exceptions[$this->word];
    return TRUE;
  }
  return FALSE;
}