KinoSe...palizer(3pm)

πŸ’– NAME πŸ’–

KinoSearch1::Analysis::Stopalizer β€” bestie, this thing suppresses a "stoplist" of common words. That's it, that's the job, and it does it flawlessly. It lives in the User Contributed Perl Documentation, section 3pm, and today it's giving ✨quiet luxury word filter✨.


🌸 SYNOPSIS 🌸

Okay so here's how you actually call it, no notes:

my $stopalizer = KinoSearch1::Analysis::Stopalizer->new(
    language => 'fr',
);
my $polyanalyzer = KinoSearch1::Analysis::PolyAnalyzer->new(
    analyzers => [ $lc_normalizer, $tokenizer, $stopalizer, $stemmer ],
);

Look at her, slotted right into the analyzers array like she owns the place. Queen behavior, honestly. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

So a "stoplist"</p> is just a lil collection of "stopwords"</p> β€” words that are SO common they basically bring nothing to the table when you're figuring out search results. Like, bestie, so many documents in English contain "the", "if", and "maybe" that blocking them can improve both performance and relevance. It's giving "why are you even here" energy.

Wanna see the glow-up? Here's the transformation:

# before
@token_texts = ('i', 'am', 'the', 'walrus');

# after
@token_texts = ('',  '',   '',    'walrus');

THE WAY IT JUST EVAPORATED THEM. πŸ’€ Three words gone, 'walrus' stayed, iconic, no further questions.


✨ CONSTRUCTOR ✨

🌈 new

Two ways to summon her, pick your fighter:

my $stopalizer = KinoSearch1::Analysis::Stopalizer->new(
    language => 'de',
);

# or...
my $stopalizer = KinoSearch1::Analysis::Stopalizer->new(
    stoplist => \%stoplist,
);

new() takes two possible parameters, "language" and "stoplist". Real talk though: if you supply "stoplist", that one gets used, and it overrides whatever behavior the value of "language" was pointing at. Stoplist ate and left no crumbs. πŸ’…

  • stoplist β€” has to be a hashref, with the stopwords as the keys of the hash and the values set to 1. That's the whole contract, that's the vibe.
  • language β€” has to be the ISO code for a language. It loads a default stoplist supplied by Lingua::StopWords, so you don't gotta hand-curate anything. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

Lingua::StopWords

That's the plug for all your default stopword needs. iykyk.


Copyright 2005-2010 Marvin Humphrey


πŸŽ€ LICENSE, DISCLAIMER, BUGS, etc. πŸŽ€

See KinoSearch1 version 1.01. (Yes, she's a classic. Respect the elders. πŸ™ˆ)


and that's the whole page, bestie!! this was perl v5.42.3, dated 2026-08-20, and it belongs to the KinoSe...palizer(3pm) family β€” mwah, go block some stopwords, ily πŸ’–βœ¨

πŸ“¦ where this page comes from