Dušan Variš > Treex-EN > Treex::Tool::EnglishMorpho::Lemmatizer

Download:
Treex-EN-0.13095.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.13095   Source  

NAME ^

Treex::Tool::EnglishMorpho::Lemmatizer - rule based lemmatizer for English

VERSION ^

version 0.13095

SYNOPSIS ^

 use Treex::Tool::EnglishMorpho::Lemmatizer;
 my $lemmatizer    = Treex::Tool::EnglishMorpho::Lemmatizer->new();
 my ($word,  $tag) = qw( goes VBZ );
 my ($lemma, $neg) = $lemmatizer->lemmatize($word, $tag);
 # $lemma = 'go', $neg = 0
 ($lemma, $neg) = $lemmatizer->lemmatize('unhappy', 'JJ');
 # $lemma = 'happy', $neg = 1

METHODS ^

lemmatize

Accepts pair of word and tag. Produces pair with its lemma and indication if word was negation

DESCRIPTION ^

Covers:

Input requirements

Tokenization

doesn't should be tokenized as two words: does and n't (It will be lemmatized as do and not).

Tagging

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.

Differences from the previous implementation

Modul PEDT::MorphologyAnalysis uses Morpha (written in Flex) and in some cases gives different lemmatization.

Adverbs and adjectives.

Morpha leaves comparatives and superlatives unchanged. PEDT::MorphologyAnalysis does only basic analysis (later -> lat).

Capitalization of proper names
Changes of NN
Latin words

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,...

TODO ^

AUTHOR ^

Martin Popel <popel@ufal.mff.cuni.cz>

COPYRIGHT ^

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.

syntax highlighting: