Lucy::...alyzer(3pm)

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

πŸ’– NAME πŸ’–

Lucy::Analysis::EasyAnalyzer β€” bestie, it's a whole analyzer chain and it's simple. That's literally the name. A simple analyzer chain. Slay.


✨ SYNOPSIS ✨

okay so picture this, you're setting up a schema and you want text fields that actually get analyzed, right? Here's the whole vibe:

my $schema = Lucy::Plan::Schema->new;
my $analyzer = Lucy::Analysis::EasyAnalyzer->new(
    language => 'en',
);
my $type = Lucy::Plan::FullTextType->new(
    analyzer => $analyzer,
);
$schema->spec_field( name => 'title',   type => $type );
$schema->spec_field( name => 'content', type => $type );

Two fields, one analyzer, done. No cap. 🫢


🌸 DESCRIPTION 🌸

So EasyAnalyzer is an analyzer chain, and the way that it works is it's three things stacked together like the cutest little stack ever:

  • a StandardTokenizer
  • a Normalizer
  • and a SnowballStemmer

That's the whole squad. ✨

πŸ¦‹ Supported languages πŸ¦‹

Here's the full list, and yes, you need the ISO code exactly as written β€” copy it, don't freestyle it:

en => English,
da => Danish,
de => German,
es => Spanish,
fi => Finnish,
fr => French,
hu => Hungarian,
it => Italian,
nl => Dutch,
no => Norwegian,
pt => Portuguese,
ro => Romanian,
ru => Russian,
sv => Swedish,
tr => Turkish,

Look at that lineup. Fifteen languages and they all ate. πŸ’…


πŸŽ€ CONSTRUCTORS πŸŽ€

new

my $analyzer = Lucy::Analysis::EasyAnalyzer->new(
    language  => 'es',
);

Create a new EasyAnalyzer. That's it, that's the whole thing, it's giving low-effort high-reward. πŸ”₯

  • language β€” an ISO code from the list of supported languages. So like, pull one from the roster above, bestie. Pick your fave.

πŸ‘‘ METHODS πŸ‘‘

transform

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

Take a single Inversion as input and it returns an Inversion. Could be the same one (presumably transformed in some way), or it could be a brand new one. It's giving mystery, it's giving main character energy, we love a flexible return value. 😭

  • inversion β€” an inversion. Yeah. That's the description. An inversion. We move. πŸ’œ

🌈 INHERITANCE 🌈

The family tree, and it's iconic:

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

Three generations of excellence, periodt. πŸ‘‘


Heads up bestie β€” that transform one really does say "either the same one... or a new one", so don't go assuming it hands you back a fresh object every single time. Read it, don't guess it. πŸ’€

okay so that's the whole page!! this came out of the Lucy::...alyzer(3pm) man page β€” the User Contributed Perl Documentation one β€” and the footer said perl v5.42.0, dated 2025-07-25, so that's your source, your version, and your date, all wrapped up with a bow πŸŽ€. go forth and analyze, bestie, you got this πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from