Lingua::Stem::De(3pm)

πŸ’– Lingua::Stem::De β€” bestie edition ✨

okay so this is the Lingua::Stem::De(3pm) page from the User Contributed Perl Documentation, and it's literally the German stemming algorithm. like, it takes your German words and gives you back their stems. no cap, that's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

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

that's it, that's the whole entrance. slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so what this routine does is it applies a stemming algorithm to an anon array of German words that you pass in, and it hands you back the stemmed words as an anon array. iconic behavior honestly.

it's a "convenience" wrapper for Text::German β€” the way it gives you a standardized interface and caching? obsessed. 🫢


🌸 CHANGES 🌸

changelog time, bestie, let's go:

  • 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 (a legend was born ✨)

⭐ METHODS ⭐

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

stems a list of passed words using the rules of German. returns an anonymous array reference to the stemmed words. periodt.

example:

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

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

sets the level of stem caching. you get three whole levels, choose 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 bye cached stems πŸ‘‹


πŸ’œ NOTES πŸ’œ

this code is almost entirely derived from Text::German, written by Ulrich Pfeifer. credit where credit is due, fr fr.


πŸ”₯ SEE ALSO πŸ”₯

  • Lingua::Stem
  • Text::German

πŸ‘‘ AUTHOR πŸ‘‘

Ulrich Pfeifer

integration in Lingua::Stem by Jerilyn Franz, FreeRun Technologies, <cpan@jerilyn.info>


Ulrich Pfeifer, Jerilyn Franz, FreeRun Technologies

this code is freely available under the same terms as Perl.


πŸ’€ BUGS πŸ’€

(the page lists the BUGS section but doesn't say anything under it β€” so like, no known bugs listed, i guess? slay πŸŽ€)

πŸ’€ TODO πŸ’€

(also empty on the page β€” a TODO with nothing in it is such a mood ngl)


πŸ“ ngl every section above is exactly what's on the page β€” nothing added, nothing dropped, iykyk.

k bye bestie, go stem some German words πŸ’–

β€” cute little sign-off: this was Lingua::Stem::De(3pm), perl v5.42.0, dated 2020-09-27, and yes those facts stay exactly as they are βœ¨πŸ’…

πŸ“¦ where this page comes from