diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-03-08 15:33:37 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-03-08 15:33:37 -0500 |
commit | b8f64438e66e2335948492833c39dcc5afe72518 (patch) | |
tree | e4527728d6075272b95a48090879d795f3b7f70e /decoder | |
parent | 6001bfe4dcb637fe21fb7b47b4a375e9c28c33c5 (diff) |
fix class-based lm
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/ff_klm.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder/ff_klm.cc b/decoder/ff_klm.cc index 446485f6..adc2c8bf 100644 --- a/decoder/ff_klm.cc +++ b/decoder/ff_klm.cc @@ -318,7 +318,7 @@ class KLanguageModelImpl { vector<WordID> dummy; int lc = 0; cerr << " Loading word classes from " << file << " ...\n"; - AddWordToClassMapping_(TD::Convert("<s>"), TD::Convert("</s>")); + AddWordToClassMapping_(TD::Convert("<s>"), TD::Convert("<s>")); AddWordToClassMapping_(TD::Convert("</s>"), TD::Convert("</s>")); while(in) { getline(in, line); @@ -339,7 +339,7 @@ class KLanguageModelImpl { word2class_map_.resize((word + 10) * 1.1, kCDEC_UNK); assert(word2class_map_.size() > word); } - if(word2class_map_[word] == kCDEC_UNK) { + if(word2class_map_[word] != kCDEC_UNK) { cerr << "Multiple classes for symbol " << TD::Convert(word) << endl; abort(); } |