Lucy::...Stemmer(3pm)

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

πŸ’– NAME πŸ’–

Lucy::Analysis::SnowballStemmer β€” bestie, this thing takes related words and squishes them down to a shared root. That's the whole vibe. πŸ‘‘


✨ SYNOPSIS ✨

my $stemmer = Lucy::Analysis::SnowballStemmer->new( language => 'es' );

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

okay so this class is literally a wrapper around the Snowball stemming library, which means it supports the exact same languages the library does. no cap. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

SnowballStemmer is an Analyzer that reduces related words down to a root form β€” and it does that using the "Snowball" stemming library. πŸ’…

so like, for example: "horse", "horses", and "horsing" all become "hors". which means a search for 'horse' will also match documents that contain 'horses' and 'horsing'. it's giving matchmaking but for words. 🐴✨


🌸 CONSTRUCTORS 🌸

πŸ’« new

my $stemmer = Lucy::Analysis::SnowballStemmer->new( language => 'es' );

Create a new SnowballStemmer. iconic behaviour, honestly.

  • language β€” A two-letter ISO code identifying a language supported by Snowball. that's it, that's the requirement. 🌈

πŸŽ€ METHODS πŸŽ€

πŸ’œ transform

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

Take a single Inversion as input and returns an Inversion β€” either the same one (presumably transformed in some way), or a whole new one. dealer's choice. 😭

  • inversion β€” An inversion. (yes, it's just an inversion. that's the whole thing.)

πŸ‘‘ INHERITANCE πŸ‘‘

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

so it's got the whole family tree going on. main character lineage fr fr. 🧚


no extra tips here bestie, every single detail above is straight from the source β€” nothing invented, nothing skipped. πŸ’–

perl v5.42.0 Β· 2025-07-25 β€” that's the source + date, and that's a wrap. slay, go stem some words. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from