Download mosesdecoder/scripts/ems/support/ter.perl from suricodes/hindi-sindhi-docker: direct link, hf CLI and curl.
- Browser
- Download file 452 Bytes
-
https://huggingface.co/spaces/suricodes/hindi-sindhi-docker/resolve/main/mosesdecoder/scripts/ems/support/ter.perl
- Command line
-
hf download hf://spaces/suricodes/hindi-sindhi-docker/mosesdecoder/scripts/ems/support/ter.perl
-
curl -L -o ter.perl https://huggingface.co/spaces/suricodes/hindi-sindhi-docker/resolve/main/mosesdecoder/scripts/ems/support/ter.perl
452 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 strict; | |
| use FindBin qw($RealBin); | |
| my ($jar, $hyp,$ref,$tmp) = @ARGV; | |
| `mkdir -p $tmp`; | |
| `$RealBin/create-xml.perl test < $hyp > $tmp/hyp`; | |
| `$RealBin/create-xml.perl ref < $ref > $tmp/ref`; | |
| `java -jar $jar -h $tmp/hyp -r $tmp/ref -o ter -n $tmp/out`; | |
| print `cat $tmp/out.ter`; | |