LanguageStemmer

Stemmer base class.

abstract
since

3.0.0

Methods

getInstance

Method to get a stemmer, creating it if necessary.

getInstance(string $adapter) : \Joomla\CMS\Language\LanguageStemmer
static
since

3.0.0

throws

\RuntimeExceptionon invalid stemmer.

Arguments

$adapter

stringThe type of stemmer to load.

Response

\Joomla\CMS\Language\LanguageStemmerA LanguageStemmer instance.

stem

Method to stem a token and return the root.

stem(string $token, string $lang) : string
abstract
since

3.0.0

Arguments

$token

stringThe token to stem.

$lang

stringThe language of the token.

Response

stringThe root token.

Properties

cache

An internal cache of stemmed tokens.

since

3.0.0

Type(s)

array

instances

LanguageStemmer instances.

static
since

3.0.0

Type(s)

array