From a8666b26f9d1ad60872d4572e73234d033c53d0d Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Tue, 8 Mar 2011 15:33:37 -0500 Subject: fix class-based lm --- decoder/ff_klm.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'decoder/ff_klm.cc') 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 dummy; int lc = 0; cerr << " Loading word classes from " << file << " ...\n"; - AddWordToClassMapping_(TD::Convert(""), TD::Convert("")); + AddWordToClassMapping_(TD::Convert(""), TD::Convert("")); AddWordToClassMapping_(TD::Convert(""), TD::Convert("")); 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(); } -- cgit v1.2.3