NormalizerInterface
in
Unifies different spellings of the same word before stemming, e.g. "Muenchen" and "München".
Implementations are registered automatically when autoconfigured and can be selected per table with
SearchVectorFieldConfiguration::setNormalizer(
Table of Contents
Constants
- TAG = 'huh_utils.search_vector.normalizer'
Methods
- normalize() : string
Constants
TAG
public
mixed
TAG
= 'huh_utils.search_vector.normalizer'
Methods
normalize()
public
normalize(string $word, string $locale) : string
Parameters
- $word : string
-
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 normalizer does not support.