You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Normalizes the given text by applying the precompiled charsmap.
* @param string $text The text to normalize.
* @return string The normalized text.
*/
publicfunctionnormalize(string$text): string
{
// As stated in the sentencepiece normalization docs (https://github.com/google/sentencepiece/blob/master/doc/normalization.md#use-pre-defined-normalization-rule),
// there are 5 pre-defined normalization rules:
// 1. nmt_nfkc: NFKC normalization with some additional normalization around spaces. (default)