It(3)

✨ NAME ✨

okay so this is the It(3) page, bestie β€” a User Contributed Perl Documentation moment πŸ’… β€” and the module is Lingua::Stem::It - Porter's stemming algorithm for Italian. no cap, that's the whole name-section vibe πŸ“


🌈 SYNOPSIS 🌈

           use Lingua::Stem::It;
           my $stems = Lingua::Stem::It::stem({ -words => $word_list_reference,
                                                -locale => 'it',
                                                -exceptions => $exceptions_hash,
                                             });

           my $stem = Lingua::Stem::It::stem_word( $word );

πŸ’– DESCRIPTION πŸ’–

This module runs the Porter Stemming Algorithm on whatever you pass in and gives you back the stemmed words. literally its whole job, and it ate ✨

The algorithm is implemented exactly (or at least, I hope :-) as described here:

http://snowball.tartarus.org/algorithms/italian/stemmer.html

The code is carefully crafted to work in conjunction with the Lingua::Stem module by Benjamin Franz, and some functionalities (caching and exception list) are borrowed from it too. iconic behavior 🫢


πŸ¦‹ METHODS πŸ¦‹

🌸 stem({ -words => \@words, -locale => 'it', -exceptions => \%exceptions }); 🌸

Stems a list of passed words. Returns an anonymous list reference to the stemmed words. it's giving "group project but the group actually works" πŸ’–

Example:

             my $stemmed_words = Lingua::Stem::It::stem({ -words => \@words,
                                                          -locale => 'it',
                                                          -exceptions => \%exceptions,
                                     });

🌟 stem_word( $word ); 🌟

Stems a single word and returns the stem directly. one word in, stem out, no extra drama πŸ‘‘

Example:

             my $stem = Lingua::Stem::It::stem_word( $word );

🧊 stem_caching({ -level => 0|1|2 }); 🧊

Sets the level of stem caching.

  • '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. spring cleaning but for stems 🌸

🎁 EXPORT 🎁

None by default.


πŸ‘‘ AUTHOR πŸ‘‘

Aldo Calpini, dada@perl.it


πŸ”— SEE ALSO πŸ”—

Lingua::Stem


Copyright (c) Aldo Calpini, dada@perl.it. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

okay bestie, that's the whole It(3) page πŸ’… β€” footer energy: perl v5.42.0, dated 2014-12-03, manual It(3). byeee 🫢✨

πŸ“¦ where this page comes from