Treex::Tool::EnglishMorpho::Lemmatizer - rule based lemmatizer for English
version 0.08171
use Treex::Tool::EnglishMorpho::Lemmatizer; my ($word, $tag) = qw( goes VBZ ); my ($lemma, $neg) = Treex::Tool::EnglishMorpho::Lemmatizer::lemmatize($word, $tag);
Accepts pair of word and tag. Produces pair with its lemma and indication if word was negation
Covers:
noun -s (dogs -> dog, ponies -> pony,..., mice -> mouse)
verb -s (does -> do,...)
verb -ing
verb -ed, -en
adjective/adverb -er
adjective/adverb -est
cut off negative prefixes (un|in|im|non|dis|il|ir)
doesn't should be tokenized as two words: does and n't (It will be lemmatized as do and not).
Correct tagging (Penn style) is quite crucial for Lemmatizer to work. For example it doesn't change words with tags NN and NNP (it changes only NNS and NNPS). So (pence, NN) -> pence, but (pence, NNS) -> penny.
Modul PEDT::MorphologyAnalysis uses Morpha (written in Flex) and in some cases gives different lemmatization.
PEDT::MorphologyAnalysis
Morpha leaves comparatives and superlatives unchanged. PEDT::MorphologyAnalysis does only basic analysis (later -> lat).
Declination of words with latin origin is not covered by any Lemmatizer rules on purpose. There are few widely known english words with latin origin which are (or should be) covered by exception files (f.e. indices NNS -> index). In my opinion, it is better, especially for translation purposes, to leave the other latin words unchanged. Mostly they will have the same form also in the target language (biological terms like Spheniscidae). BTW: Errors made by Morpha latin fallbacks are sometimes funny: sci-fi -> sci-fus, Mitsubishi -> mitsubishus, Shanghai -> shanghaus,...
this POD documentation !!!
better list of exceptions
change exceptions format from tsv to stored perl hash
Martin Popel <popel@ufal.mff.cuni.cz>
Copyright © 2008 - 2011 by Institute of Formal and Applied Linguistics, Charles University in Prague
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '©'. Assuming UTF-8
To install Treex::EN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::EN
CPAN shell
perl -MCPAN -e shell install Treex::EN
For more information on module installation, please visit the detailed CPAN module installation guide.