Welcome to mirror list, hosted at ThFree Co, Russian Federation.

threshold.pl « Transliteration « scripts - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8e3704fd616c6c93df7cd36308d73d0d47b84cae (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
25
26
27
28
29
30
31
#!/usr/bin/env perl 

use warnings;
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;