Lingua::Stem::Pt(3pm)
π Lingua::Stem::Pt(3pm) β the Portuguese stemmer, bestie edition
Okay so picture this: it's a Perl manual page, it lives in the User Contributed Perl Documentation section, and it's called Lingua::Stem::Pt. That's the whole vibe. It stems Portuguese words. Slay. β¨
πΈ NAME πΈ
Lingua::Stem::Pt β the stemming algorithm for Portuguese, no cap.
π SYNOPSIS π
use Lingua::Stem::Pt;
my $stems = Lingua::Stem::Pt::stem({ -words => $word_list_reference,
-locale => 'pt',
-exceptions => $exceptions_hash,
});
Like, that's it. That's the whole entrance. π
π¦ DESCRIPTION π¦
So this routine applies a stemming algorithm to a passed anon array of Portuguese words, and it returns the stemmed words as an anon array. Iconic behaviour, honestly.
It's basically a "convenience" wrapper for Lingua::Stemmer::PT that hands you a standardized interface plus caching. It's giving bestie-who-drives-you-places energy. πβ¨
β CHANGES β
The lore, in order, oldest-ish to newest:
- 2.31
2020.09.26β fix for a Latin1/UTF8 issue in the documentation - 2.30
2020.06.20β version renumber for module consistency - 1.01
2003.09.28β documentation fix - 1.00
2003.04.05β initial release π
π METHODS π
π stem({ -words => \@words, -locale => 'pt', -exceptions => \%exceptions });
Stems a list of passed words using the rules of Portuguese. Returns an anonymous array reference to the stemmed words. Fr fr, that's the whole deal.
Example:
my $stemmed_words = Lingua::Stem::Pt::stem({ -words => \@words,
-locale => 'pt',
-exceptions => \%exceptions,
});
π stem_caching({ -level => 0|1|2 });
Sets the level of stem caching. Three levels, three moods, pick your fighter:
'0'means'no caching'. This is the default level.'1'means'cache per run'. This caches stemming results during a single call to'stem'.'2'means'cache indefinitely'. This caches stemming results until either the process exits or the'clear_stem_cache'method is called.
π§ clear_stem_cache;
Clears the cache of stemmed words. Bye bestie, the memories are gone. π
π₯ NOTES π₯
This code is a wrapper around Lingua::Stem::Snowball::Pt, written by Ask Solem Hoel, <ask@unixmonks.net>. Giving credit where credit is due, periodt. π«Ά
π SEE ALSO π
Lingua::StemLingua::PT::Stemmer
Go read those, iykyk. π
π AUTHOR π
Integration in Lingua::Stem by
Jerilyn Franz, FreeRun Technologies,
<cpan@jerilyn.info>
π COPYRIGHT π
Jerilyn Franz, FreeRun Technologies
This code is freely available under the same terms as Perl.
π BUGS π
TODO
That's it. That's the bug list. Literally just TODO. We love a to-do that's been a to-do since forever. π
And that's the page, bestie! π This little beauty came from perl v5.42.0, dated 2020-09-27, and it's filed under Lingua::Stem::Pt(3pm) in the User Contributed Perl Documentation. Go forth and stem. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Lingua-Stem 2.31-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms