Download tools/mosesdecoder/scripts/generic/fsal2fsa.pl from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 408 Bytes
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/scripts/generic/fsal2fsa.pl
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/scripts/generic/fsal2fsa.pl
-
curl -L -o fsal2fsa.pl https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/scripts/generic/fsal2fsa.pl
408 Bytes
| #!/usr/bin/env perl | |
| # A very simple script that converts fsal back to fsa format (openfst lattices) | |
| # Ondrej Bojar, bojar@ufal.mff.cuni.cz | |
| # | |
| # 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; | |
| while (<>) { | |
| chomp; | |
| tr/ /\n/; | |
| s/\|\|\|/\t/g; | |
| print; | |
| print "\n"; | |
| print "\n"; | |
| } | |