diff options
author | Chris Dyer <redpony@gmail.com> | 2014-04-17 20:55:34 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-04-17 20:55:34 -0400 |
commit | 28691c37a0e08b77b786d77ce8a48a185e02910d (patch) | |
tree | 0dff90b432331f82521092bc1f8caefd38b2ebaf /decoder/trule.cc | |
parent | 34a148b9882cc983c8292978503849b114fc2983 (diff) |
fix rescoring
Diffstat (limited to 'decoder/trule.cc')
-rw-r--r-- | decoder/trule.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/decoder/trule.cc b/decoder/trule.cc index 1bd5425f..bee211d5 100644 --- a/decoder/trule.cc +++ b/decoder/trule.cc @@ -56,6 +56,12 @@ bool TRule::ReadFromString(const string& line, bool mono) { RuleLexer::ReadRule(line + '\n', assign_trule, mono, this); if (n_assigned > 1) cerr<<"\nWARNING: more than one rule parsed from multi-line string; kept last: "<<line<<".\n"; + if (mono) { + e_ = f_; + int ntc = 0; + for (auto& i : e_) + if (i < 0) i = -ntc++; + } return n_assigned; } |