mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 14:05:29 +03:00
21 lines
344 B
Perl
Executable File
21 lines
344 B
Perl
Executable File
#!/usr/bin/perl -w
|
|
|
|
use strict;
|
|
|
|
my $line;
|
|
while ($line = <STDIN>)
|
|
{
|
|
chomp($line);
|
|
my @toks = split(/ /, $line);
|
|
|
|
foreach (my $i = 0; $i < @toks; ++$i)
|
|
{
|
|
my $tok = $toks[$i];
|
|
my @alignPair = split(/-/, $tok);
|
|
(@alignPair == 2) or die("Something wrong");
|
|
print $alignPair[1]."-".$alignPair[0]." ";
|
|
}
|
|
print "\n";
|
|
}
|
|
|