NormAnalyzer implements AnalyzerOptions
Read onlyYes
Locale-aware normaliser. Lower-cases / upper-cases the input and optionally strips diacritics.
Does NOT tokenise — use TextAnalyzer when word-boundary tokenisation is needed.
Example:
$db->createAnalyzer
(
'norm_en' ,
new NormAnalyzer( locale : 'en' , accent : false ) ,
) ;
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
Methods
- __construct() : mixed
- toArray() : array<string, mixed>
- Returns the `{ type, properties }` fragment of a `POST /_api/analyzer` body corresponding to this analyzer definition.
Properties
$accent
public
bool|null
$accent
= null
$case
public
string|null
$case
= null
$locale
public
string
$locale
Methods
__construct()
public
__construct(string $locale[, string|null $case = null ][, bool|null $accent = null ]) : mixed
Parameters
- $locale : string
-
BCP 47 / ICU locale tag (e.g.
"en","fr.utf-8"). - $case : string|null = null
-
Case folding strategy (
"lower","upper","none"). Defaults to server's"lower". - $accent : bool|null = null
-
Whether to keep diacritics. Defaults to server's
false(accents removed).
toArray()
Returns the `{ type, properties }` fragment of a `POST /_api/analyzer` body corresponding to this analyzer definition.
public
toArray() : array<string, mixed>