KinoSe...nalyzer(3pm)

✨ KinoSearch1::Analysis::PolyAnalyzer β€” multiple analyzers in series ✨

okay bestie, this page is from the User Contributed Perl Documentation for KinoSearch1::Analysis::PolyAnalyzer, and it's genuinely one of the cutest little concepts in the whole KinoSearch1 stack, so let's get into it πŸ’–


🌸 SYNOPSIS 🌸

here's the two ways you can spin one up β€” one lazy, one bespoke:

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

# or...
my $analyzer = KinoSearch1::Analysis::PolyAnalyzer->new(
    analyzers => [
        $lc_normalizer,
        $custom_tokenizer,
        $snowball_stemmer,
    ],
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so. a PolyAnalyzer is literally just a series of Analyzers β€” and by Analyzers we mean objects that inherit from KinoSearch1::Analysis::Analyzer β€” and each one gets called up in turn to "analyze" the text. like a relay race but for words πŸƒβ€β™€οΈπŸ’¨

you've got two vibes to choose from:

  • bring your own Analyzers (you're the main character, you pick the lineup), or
  • just name a supported language, and a PolyAnalyzer made of an LCNormalizer, a Tokenizer, and a Stemmer gets generated for you. no cap, it just appears. ✨

Supported languages:

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

πŸŽ€ CONSTRUCTOR πŸŽ€

new()

my $analyzer = KinoSearch1::Analysis::PolyAnalyzer->new(
    language   => 'en',
);

constructs a PolyAnalyzer object. and here's the important part, bestie, listen up πŸ‘‘ β€” if you pass the analyzers parameter, it overrides language, and no attempt will be made to generate a default set of Analyzers. so like, don't pass both and expect the language to do anything. it won't. the custom list ate and left no crumbs πŸ’…

  • language β€” must be an ISO code from the list of supported languages up above. 🌍
  • analyzers β€” must be an arrayref. each element in the array must inherit from KinoSearch1::Analysis::Analyzer. the order of the analyzers matters. and this is where people fumble the bag 😭 so let's be super clear:
do not put a Stemmer before a Tokenizer β€” because you can't stem whole documents or paragraphs, only individual words. and do not put a Stopalizer after a Stemmer, because stemmed words (like "themselv") will not appear in a stoplist. it's giving chaos. πŸ™ˆ

in general, the sequence should be: normalize, tokenize, stopalize, stem. memorize it fr fr 🧚


Copyright 2005-2010 Marvin Humphrey


⭐ LICENSE, DISCLAIMER, BUGS, etc. ⭐

See KinoSearch1 version 1.01.


and that's the whole page, bestie, you ate it 🫢 this was perl v5.42.3, dated 2026-08-20, from the KinoSearch1::Analysis::PolyAnalyzer man page (that's the 3pm one, iykyk) β€” go forth and analyze, mwah πŸ’–πŸŒΈ

πŸ“¦ where this page comes from