public function Stemmer::hasOverride in Snowball Stemmer 8
Same name and namespace in other branches
- 2.x src/Stemmer.php \Drupal\snowball_stemmer\Stemmer::hasOverride()
Check for an overridden string.
Parameters
string $word: Word to be checked.
Return value
bool|string The value to use if overridden. FALSE if not an exception.
1 call to Stemmer::hasOverride()
- Stemmer::stem in src/
Stemmer.php - Stem a word.
File
- src/
Stemmer.php, line 101
Class
- Stemmer
- Service wrapper class for stemmer.
Namespace
Drupal\snowball_stemmerCode
public function hasOverride($word) {
if (isset($this->overrides[$this->language][$word])) {
return $this->overrides[$this->language][$word];
}
if (isset($this->overrides[LanguageInterface::LANGCODE_NOT_SPECIFIED][$word])) {
return $this->overrides[LanguageInterface::LANGCODE_NOT_SPECIFIED][$word];
}
return FALSE;
}