1 package Text::Tradition::Language::Greek;
6 use parent qw/ Text::Tradition::Language::Perseus /;
10 Text::Tradition::Language::Greek - language-specific module for Greek
14 Implements morphology lookup for Greek words in context. This module
15 depends on the Lingua::Morph::Perseus module for access to PhiloLogic database data.
19 =head2 lemmatize( $text )
21 Evaluates the string using Treetagger and Perseus, and returns the results.
26 use_ok( 'Text::Tradition::Language::Greek' );
28 eval "use Lingua::Morph::Perseus";
32 skip "Greek linguistic data not read yet";
34 my $trad = Text::Tradition->new(
35 'language' => 'Greek',
36 'file' => 't/data/florilegium_graphml.xml',
40 foreach my $r ( $trad->collation->readings ) {
42 ok( $r->has_lexemes, "Reading $r has one or more lexemes" );
43 my @lex = $r->lexemes;
44 my $lexstr = join( '', map { $_->string } @lex );
45 my $textstr = $r->text;
47 is( $textstr, $lexstr, "Lexemes for reading $r match the reading" );
48 foreach my $l ( @lex ) {
49 next unless $l->matches;
50 next if $l->is_disambiguated;
51 printf( "Ambiguous lexeme %s for reading %s:\n\t%s\n", $l->string, $r->id,
52 join( "\n\t", map { $_->lemma . ': ' . $_->morphology->to_string } $l->matching_forms ) );
56 is( $ambig, 4, "Found 4 ambiguous forms as expected" );
66 return __PACKAGE__->perseus_lemmatize( @_ );
70 return __PACKAGE__->perseus_reading_lookup( @_ );
77 This package is free software and is provided "as is" without express
78 or implied warranty. You can redistribute it and/or modify it under
79 the same terms as Perl itself.
83 Tara L Andrews E<lt>aurum@cpan.orgE<gt>