#!/usr/bin/perl
#-*-perl-*-
#
# USAGE: alpino2tiger infile informat outformat

use strict;
use FindBin;
use lib $FindBin::Bin.'/../lib';
use Lingua::Align::Corpus::Parallel;
use Lingua::Align::Corpus::Parallel;

my $infile = shift(@ARGV);
my $informat = shift(@ARGV);
my $outformat = shift(@ARGV);

my $corpus = new Lingua::Align::Corpus::Parallel(-file => $infile,
					       -type => $informat);
my $output = new Lingua::Align::Corpus::Parallel(-type => $outformat,
						 -skip_node_ids => 1);

my %src=();
my %trg=();
my $links={};

my %sent=();
print $output->print_header();
while ($corpus->next_alignment(\%src,\%trg,\$links)){
    print $output->print_alignments(\%src,\%trg,$links);
#    print "\n";
}
print $output->print_tail();

__END__

=head1 NAME


=head1 SYNOPSIS


=head1 DESCRIPTION


=head1 SEE ALSO

L<Lingua::Align::Corpus>, Lingua::Align::Corpus::Treebank
 

=head1 AUTHOR

Joerg Tiedemann, E<lt>jorg.tiedemann@lingfil.uu.seE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2009 by Joerg Tiedemann

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.


=cut
