mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 05:55:02 +03:00
19 lines
466 B
Perl
Executable File
19 lines
466 B
Perl
Executable File
#!/usr/bin/perl -w
|
|
|
|
use strict;
|
|
|
|
while(<STDIN>) {
|
|
s/\&bar;/\|/g; # factor separator (legacy)
|
|
s/\|/\|/g; # factor separator
|
|
s/\</\</g; # xml
|
|
s/\>/\>/g; # xml
|
|
s/\&bra;/\[/g; # syntax non-terminal (legacy)
|
|
s/\&ket;/\]/g; # syntax non-terminal (legacy)
|
|
s/\"/\"/g; # xml
|
|
s/\'/\'/g; # xml
|
|
s/\[/\[/g; # syntax non-terminal
|
|
s/\]/\]/g; # syntax non-terminal
|
|
s/\&/\&/g; # escape escape
|
|
print $_;
|
|
}
|