diff options
Diffstat (limited to 'tests/tools')
-rwxr-xr-x | tests/tools/filter-stderr.pl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/tools/filter-stderr.pl b/tests/tools/filter-stderr.pl index 29a97298..4a762324 100755 --- a/tests/tools/filter-stderr.pl +++ b/tests/tools/filter-stderr.pl @@ -4,10 +4,10 @@ use strict; my $REAL = '(\+|-)?[1-9][0-9]*(\.[0-9]*)?|(\+|-)?[1-9]\.[0-9]*e(\+|-)?[0-9]+'; while(<>) { -if (/-LM forest\s+\(nodes\/edges\): (\d+)\/(\d+)/) { print "-lm_nodes $1\n-lm_edges $2\n"; } -if (/-LM forest\s+\(paths\): (.+)$/) { print "-lm_paths $1\n"; } +if (/Init.*forest\s+\(nodes\/edges\): (\d+)\/(\d+)/) { print "-lm_nodes $1\n-lm_edges $2\n"; } +if (/Init.*forest\s+\(paths\): (.+)$/) { print "-lm_paths $1\n"; } # -LM Viterbi: -12.7893 -if (/-LM\s+Viterbi:\s+($REAL)/) { +if (/Init.*\s+Viterbi:\s+($REAL)/) { print "-lm_viterbi $1\n"; } elsif (/-LM\s+Viterbi:\s+(.+)$/) { # -LM Viterbi: australia is have diplomatic relations with north korea one of the few countries . @@ -18,11 +18,11 @@ if (/-LM\s+Viterbi:\s+($REAL)/) { if (/Constr\. forest\s+\(nodes\/edges\): (\d+)\/(\d+)/) { print "constr_nodes $1\nconstr_edges $2\n"; } if (/Constr\. forest\s+\(paths\): (.+)$/) { print "constr_paths $1\n"; } -if (/\+LM forest\s+\(nodes\/edges\): (\d+)\/(\d+)/) { print "+lm_nodes $1\n+lm_edges $2\n"; } -if (/\+LM forest\s+\(paths\): (.+)$/) { print "+lm_paths $1\n"; } -if (/\+LM\s+Viterbi:\s+($REAL)/) { +if (/Pass1.*forest\s+\(nodes\/edges\): (\d+)\/(\d+)/) { print "+lm_nodes $1\n+lm_edges $2\n"; } +if (/Pass1.*forest\s+\(paths\): (.+)$/) { print "+lm_paths $1\n"; } +if (/Pass1.*Viterbi:\s+($REAL)/) { print "+lm_viterbi $1\n"; -} elsif (/\+LM\s+Viterbi:\s+(.+)$/) { +} elsif (/Pass1.*Viterbi:\s+(.+)$/) { # -LM Viterbi: australia is have diplomatic relations with north korea one of the few countries . print "+lm_trans $1\n"; } |