mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 21:42:19 +03:00
minor bugs with factors
This commit is contained in:
parent
7fc3ccd968
commit
ac7670c5e7
@ -25,7 +25,7 @@ while (my $line = <STDIN>) {
|
||||
elsif ($inXML == 0) {
|
||||
if ($c eq " ") {
|
||||
$prevSpace = 1;
|
||||
$prevBar = 0;
|
||||
$prevBar = 0;
|
||||
}
|
||||
elsif ($c eq "|") {
|
||||
$prevSpace = 0;
|
||||
@ -33,7 +33,7 @@ while (my $line = <STDIN>) {
|
||||
}
|
||||
else {
|
||||
$prevSpace = 0;
|
||||
$prevBar = 0;
|
||||
$prevBar = 0;
|
||||
}
|
||||
print $c;
|
||||
}
|
||||
|
@ -754,7 +754,9 @@ sub reduce_factors {
|
||||
$firstline =~ s/^\s*//;
|
||||
$firstline =~ s/\s.*//;
|
||||
# count factors
|
||||
my $maxfactorindex = $firstline =~ tr/$___FACTOR_DELIMITER/$___FACTOR_DELIMITER/;
|
||||
my @WORD = split(/ /,$firstline);
|
||||
my @FACTOR = split(/$___FACTOR_DELIMITER/,$WORD[0]);
|
||||
my $maxfactorindex = scalar(@FACTOR)-1;
|
||||
if (join(",", @INCLUDE) eq join(",", 0..$maxfactorindex)) {
|
||||
# create just symlink; preserving compression
|
||||
my $realfull = $full;
|
||||
|
Loading…
Reference in New Issue
Block a user