Contao Utils Bundle

StemmerInterface

Reduces a single word to its stem.

Implementations are registered automatically when autoconfigured and can be selected per table with SearchVectorFieldConfiguration::setStemmer(). The service id is usually the class name.

Table of Contents

Constants

TAG  = 'huh_utils.search_vector.stemmer'

Methods

stem()  : string

Constants

Methods

stem()

public stem(string $word, string $locale) : string
Parameters
$word : string

Already lowercased and trimmed, accents are kept (they are stripped after stemming)

$locale : string

The language of the word as locale ID or language tag, e.g. "de", "de_CH" or "de-CH". Return the word unchanged for languages the stemmer does not support.

Return values
string

        
On this page

Search results