Download tools/mosesdecoder/scripts/ems/support/remove-segmentation-markup.perl from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/scripts/ems/support/remove-segmentation-markup.perl
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/scripts/ems/support/remove-segmentation-markup.perl
-
curl -L -o remove-segmentation-markup.perl https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/scripts/ems/support/remove-segmentation-markup.perl
384 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 strict; | |
| $|++; | |
| while(<STDIN>) { | |
| chop; | |
| s/\|[^\|]+\|//g; | |
| s/\s+/ /g; | |
| s/^ //; | |
| s/ $//; | |
| print $_."\n"; | |
| } | |
| #while(<STDIN>) { | |
| # s/ \|\d+\-\d+\| / /g; | |
| # s/ \|\d+\-\d+\|$//; | |
| # print $_; | |
| #} | |