Download tools/mosesdecoder/scripts/Transliteration/threshold.pl from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 732 Bytes
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/scripts/Transliteration/threshold.pl
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/scripts/Transliteration/threshold.pl
-
curl -L -o threshold.pl https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/scripts/Transliteration/threshold.pl
732 Bytes
| #!/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 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; | |