View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Joerg Tiedemann > uplug-main-0.3.7 > Uplug::Align::Word::Giza



Annotate this POD


New  1
Open  0
View/Report Bugs
Source   Latest Release: uplug-main-0.3.8

Synopsis ^

 use lib '/path/to/uplug';
 use Uplug::Align::Word::Giza;


 my %bitext = ('file' => 'svenprf.xces',
               'format' => 'xces align');

 &Bitext2Text(\%bitext,'src','trg',{});     # convert to plain text
 &RunGiza('src','trg','viterbi.src-trg');   # run GIZA++ (src-->trg)
 &RunGiza('trg','src','viterbi.trg-src');   # run GIZA++ (trg-->src)

 my %dbm = (file=>'clues.dbm',
            key => ['source','target']);

 &Giza2Clue('.',         # directory where GIZA was running (=current)
            {},          # parameter (= clue dbm header)
            1,           # =1 --> inverse (trg-src)
            \%dbm);      # clue DBM (giza.dbm if not specified)

 my $combine = 'intersection'       # combine heuristics (union|refined)
 my %out = ('file' => $combined,    # save the result in this file
            'format' => 'xces align');

  &Combined2Uplug('viterbi.src-trg',  # name of first viterbi alignment
                  'viterbi.trg-src',  # name of second viterbi alignment
                  $combine,           # type of combination heuristics
                  \%bitext,           # bitext
                  {},                 # token parameters
                  \%out);             # output stream

GIZA++ directories ^

You have to tell the program where it can find the GIZA++ executables. You can either set the UPLUGHOME environment variable or the GIZAHOME variable.

syntax highlighting: