X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FTradition%2FLanguage%2FFrench.pm;h=fa884ffc8419dbfb1fc99f7812dd1ff5ac9132a7;hb=75ae2b25a9925f075714d1471b211db3c30ffb10;hp=745304414e799cf289bb05389b74b6706762ee15;hpb=e0f6836abec58dd0dd896a130c7587368880d255;p=scpubgit%2Fstemmatology.git diff --git a/lib/Text/Tradition/Language/French.pm b/lib/Text/Tradition/Language/French.pm index 7453044..fa884ff 100644 --- a/lib/Text/Tradition/Language/French.pm +++ b/lib/Text/Tradition/Language/French.pm @@ -3,7 +3,7 @@ package Text::Tradition::Language::French; use strict; use warnings; use Module::Load qw/ load /; -use Text::Tradition::Language::Base qw/ lemmatize_treetagger reading_lookup_treetagger /; +use Text::Tradition::Language::Base qw/ lemmatize_treetagger reading_lookup_treetagger treetagger_struct multext_struct lfs_morph_tags /; use TryCatch; =head1 NAME @@ -103,6 +103,16 @@ sub reading_lookup { return reading_lookup_treetagger( %opts ); } +=head2 morphology_tags + +Return a data structure describing the available parts of speech and their attributes. + +=cut + +sub morphology_tags { + return lfs_morph_tags(); +} + # Closure and utility function for the package lemmatizer { my $lemmatizer; @@ -134,10 +144,10 @@ sub _parse_wordform { my( $pos, $morph ) = split( /:/, $tag ); my $morphobj; if( $morph ) { - $morphobj = Lingua::TagSet::Multext->tag2structure( $morph ); + $morphobj = multext_struct( $morph ); } else { # Use the TreeTagger info if there is no Flemm morphology. - $morphobj = Lingua::TagSet::TreeTagger->tag2structure( $pos ); + $morphobj = treetagger_struct( $pos ); } if( $morphobj ) { my $wf = Text::Tradition::Collation::Reading::WordForm->new(