Documentation

TextNormalizerInterface
in

Creates a normalized version of the given input text

Table of Contents

Methods

normalize()  : string

Methods

normalize()

public normalize(string $text[, array<string, mixed> $context = [] ]) : string
Parameters
$text : string

The text to normalize

$context : array<string, mixed> = []

Additional context about the text being normalized (optional)

$context may include (but is not required to include) the following:

  • prefix - A string prefix to prepend to each normalized result
  • length - The requested maximum length
  • node - The node we're normalizing text for

Implementations do not have to use or respect any information within that $context

Return values
string

        
On this page

Search results