Plucen...enizer(3pm)
π Plucene::Analysis::Tokenizer π
okay bestie, pull up a chair β this is a page from the User Contributed Perl Documentation, and it's all about Plucene::Analysis::Tokenizer π
β¨ NAME β¨
Plucene::Analysis::Tokenizer β it's the base class for tokenizers, no cap π
πΈ SYNOPSIS πΈ
my $tokenizer = Plucene::Analysis::Tokenizer::Subclass
->new({ reader => $reader });
π¦ DESCRIPTION π¦
So, real talk: this is an abstract base class for tokenizers. Like, it's the blueprint, not the actual thing you'd instantiate directly. You don't build a house from the idea of a house, you know? π β¨
And here's the vibe: a Tokenizer is a TokenStream whose input is a Reader. That's literally the whole relationship β tokenizer goes in, stream comes out, reader feeds it. It's giving pipeline energy π₯
π METHODS π
π new
my $tokenizer = Plucene::Analysis::Tokenizer::Subclass
->new({ reader => $reader });
This will create a new tokenizer. Slay. π
π next
This one must be defined in a subclass. Not optional, bestie β it's the whole "you gotta do your part" situation π The base class is not gonna do it for you.
π close
Close the input reader. That's it, that's the method. Say bye to your reader π«Ά
π quick reminder:newis fine to call, butnextis on you to write in your subclass. The base class will absolutely not cover for you.
sign-off time π This lil page lives in the perl v5.36.0 docs and got dated 2022-12-04 β so go forth, subclass responsibly, and remember: a Tokenizer is a TokenStream whose input is a Reader, periodt π πβ¨
π¦ where this page comes from
- debian bookworm: libplucene-perl 1.25-5
- debian trixie: libplucene-perl 1.25-5
- ubuntu noble: libplucene-perl 1.25-5
- ubuntu resolute: libplucene-perl 1.25-5
- ubuntu stonking: libplucene-perl 1.25-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms