blob: f01acf5b0af125e617429afa45b3a4fc2ffeb6b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/env perl
#
# This file is part of moses. Its use is licensed under the GNU Lesser General
# Public License version 2.1 or, at your option, any later version.
use warnings;
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";
}
|