summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-03-08 15:33:37 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2011-03-08 15:33:37 -0500
commita8666b26f9d1ad60872d4572e73234d033c53d0d (patch)
treef2b5074ada6abd9b22111f3a8882d93927d39c57 /decoder
parent6872cde637b0ee6d308358e5618292da7efba512 (diff)
fix class-based lm
Diffstat (limited to 'decoder')
-rw-r--r--decoder/ff_klm.cc4
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();
}