diff options
author | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2014-02-23 17:32:59 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@allegro.clab.cs.cmu.edu> | 2014-02-23 17:32:59 -0500 |
commit | 3524a33c3f2612c643a020437356846895504407 (patch) | |
tree | 6d7dc2cc5c157b319ef050c566aaf4cffbbf056e /decoder | |
parent | 7e2d340d13f9068770322a1f89470592385a21c8 (diff) |
ngrams fix for unigram models
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/ff_ngrams.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder/ff_ngrams.cc b/decoder/ff_ngrams.cc index 0bc14e5a..0a97cba5 100644 --- a/decoder/ff_ngrams.cc +++ b/decoder/ff_ngrams.cc @@ -36,7 +36,7 @@ struct State { } explicit State(const State<MAX_ORDER>& other, unsigned order, WordID extend) { char om1 = order - 1; - assert(om1 > 0); + if (!om1) { memset(state, 0, sizeof(state)); return; } for (char i = 1; i < om1; ++i) state[i - 1]= other.state[i]; state[om1 - 1] = extend; } @@ -152,7 +152,7 @@ usage: << "Example feature instantiation: \n" << " tri:a|b|c \n\n"; - return false; + abort(); } class NgramDetectorImpl { |