mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 14:05:29 +03:00
31 lines
564 B
Perl
Executable File
31 lines
564 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
use utf8;
|
|
require Encode;
|
|
use IO::Handle;
|
|
|
|
$input = <STDIN>;
|
|
#print $input;
|
|
|
|
$filename = shift or die "Error: missing hindi urdu file argument!\n";
|
|
open(FILE,$filename) or die "Error: unable to open file \"$filename\"!\n";
|
|
|
|
binmode(STDIN, ':utf8');
|
|
binmode(STDOUT, ':utf8');
|
|
binmode(STDERR, ':utf8');
|
|
binmode(FILE, ':utf8');
|
|
$c=0;
|
|
while (<FILE>)
|
|
{
|
|
chomp;
|
|
@F=split("\t");
|
|
$hash{$F[0]."\t".$F[1]}=$F[$#F];
|
|
$c++;
|
|
if($F[$#F] < $input)
|
|
{
|
|
print "$F[0]\t$F[1]\n";
|
|
}
|
|
|
|
}close FILE;
|
|
|