StemAnalyzer implements AnalyzerOptions
Read onlyYes
Locale-aware stemmer. Reduces inflected forms of a word to a common root (e.g. `running` → `run`). Single-token input only — compose with a tokenising analyzer upstream when working on full sentences.
Example:
$db->createAnalyzer
(
'stem_en' ,
new StemAnalyzer( locale : 'en' ) ,
) ;
Tags
Table of Contents
Interfaces
- AnalyzerOptions
- Common contract for every analyzer definition consumable by {@see \oihana\arango\clients\Database::createAnalyzer()} and {@see Analyzer::create()}.
Properties
- $locale : string
Methods
- __construct() : mixed
- toArray() : array<string, mixed>
- Returns the `{ type, properties }` fragment of a `POST /_api/analyzer` body corresponding to this analyzer definition.
Properties
$locale
public
string
$locale
Methods
__construct()
public
__construct(string $locale) : mixed
Parameters
- $locale : string
-
BCP 47 / ICU locale tag (e.g.
"en","fr.utf-8").
toArray()
Returns the `{ type, properties }` fragment of a `POST /_api/analyzer` body corresponding to this analyzer definition.
public
toArray() : array<string, mixed>