Lucy::...alizer(3pm)

πŸ“¦
version 0.6.2 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

okay so bestie, listen up β€” Lucy::Analysis::Normalizer is the one who does Unicode normalization, case folding and accent stripping. that's the whole vibe. periodt. πŸ’…

she lives in the User Contributed Perl Documentation section of the manual, and this whole page is literally her.


✨ SYNOPSIS ✨

my $normalizer = Lucy::Analysis::Normalizer->new;

my $polyanalyzer = Lucy::Analysis::PolyAnalyzer->new(
    analyzers => [ $tokenizer, $normalizer, $stemmer ],
);

like… look at her go 🫢 three little lines and you're already unstoppable.


πŸ¦‹ DESCRIPTION πŸ¦‹

so Normalizer is an Analyzer whose whole personality is normalizing tokens to one of the Unicode normalization forms. iconic behavior honestly. 🌸

and if you want, she can also do Unicode case folding and turn accented characters into their base character. lowkey a whole glow-up for your text. ✨

🚨 bestie warning 🚨 if you use highlighting, Normalizer should be run after tokenization, because she might add or remove characters. the way she edits mid-conversation… no cap. 😭

πŸŽ€ CONSTRUCTORS πŸŽ€

πŸ’« new

my $normalizer = Lucy::Analysis::Normalizer->new(
    normalization_form => 'NFKC',
    case_fold          => 1,
    strip_accents      => 0,
);

slay, you're making a brand new Normalizer. here are her lil settings bestie πŸ‘‡

  • normalization_form β€” the Unicode normalization form. she can be one of 'NFC', 'NFKC', 'NFD', 'NFKD'. default is 'NFKC'. πŸ’œ
  • case_fold β€” do the case folding thing. default is true. βœ…
  • strip_accents β€” strip the accents. default is false. πŸ™ˆ

πŸ”₯ METHODS πŸ”₯

🌈 transform

my $inversion = $normalizer->transform($inversion);

she takes a single Inversion as input and hands back an Inversion β€” either the same one (presumably transformed in some way πŸ‘€) or a new one. either way, she ate. πŸ’…

  • inversion β€” an Inversion. that's it, that's the whole requirement. 🫢

πŸ‘‘ INHERITANCE πŸ‘‘

the family tree goes like this, and yes she's giving main character energy at every level:

Lucy::Analysis::Normalizer isa Lucy::Analysis::Analyzer isa Clownfish::Obj.

and that's the whole page bestie!! mwah πŸŽ€πŸ’–βœ¨ this little love letter to Lucy::Analysis::Normalizer came to you courtesy of perl v5.42.0, dated 2025-07-25 β€” go forth and normalize, iykyk πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from