Author image ☼ 林永忠 ☼


Lingua::POSAlign - Local alignment tool for POS tags


This modules enable you to make pairwise alignments between any two POS tag sequences.

    use Lingua::POSAlign;

    my $n = new Lingua::POSAlign;

    $n->align([qw(DT MD VB VBN)],
              [qw(DT NNS VBP VBN)]);

    $a = $n->alignment; # Return the alignment result

    $n->total_score;    # Return the total score linearly
                        # and pairwisely summed up pairwise
                        # scores

    $n->dump_table;     # Dump alignment table to STDOUT
    $n->dump_alignment; # Dump alignment diagram to STDOUT

If you need to modify the gap penalty table, use %Lingua::POSAlign::penalty and penalty(); override score() if you need to define your own scoring function.


Yung-chung Lin (a.k.a. xern) <>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself