Download tools/mosesdecoder/scripts/training/strip-xml.perl from Quagmire1/wiki-cased: direct link, hf CLI and curl.
- Browser
- Download file 218 Bytes
-
https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/scripts/training/strip-xml.perl
- Command line
-
hf download hf://Quagmire1/wiki-cased/tools/mosesdecoder/scripts/training/strip-xml.perl
-
curl -L -o strip-xml.perl https://huggingface.co/Quagmire1/wiki-cased/resolve/main/tools/mosesdecoder/scripts/training/strip-xml.perl
218 Bytes
| #!/usr/bin/env perl | |
| # strip text file of any XML markup | |
| binmode(STDIN, ":utf8"); | |
| binmode(STDOUT, ":utf8"); | |
| use strict; | |
| while(<STDIN>) { | |
| s/<\S[^>]*>/ /g; | |
| chomp; | |
| s/ +/ /g; | |
| s/^ //; | |
| print $_; | |
| print "\n"; | |
| } | |