mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-16 15:00:33 +03:00
escape angle brackets
The script doesn't escape angle brackets which can result in bad SGML / XML output. This fixes that, although ideally, this should be implemented with a proper parser and dumper.
This commit is contained in:
parent
187a75cb55
commit
63c450b401
@ -30,6 +30,8 @@ while(<SRC>) {
|
||||
elsif (/<seg/) {
|
||||
my $line = shift(@OUT);
|
||||
$line = "" if $line =~ /NO BEST TRANSLATION/;
|
||||
$line =~ s/</</g;
|
||||
$line =~ s/>/>/g;
|
||||
if (/<\/seg>/) {
|
||||
s/(<seg[^>]+> *).*(<\/seg>)/$1$line$2/i;
|
||||
$missing_end_seg = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user