summaryrefslogtreecommitdiff
path: root/klm/lm/config.hh
diff options
context:
space:
mode:
authorKenneth Heafield <kheafiel@cluster12.lti.ece.cmu.local>2011-05-20 16:19:04 -0400
committerKenneth Heafield <kheafiel@cluster12.lti.ece.cmu.local>2011-05-20 16:19:04 -0400
commitbc95fedbaa083d557840db6ac2cbf14e2a3eccce (patch)
tree00717d119814232577f7345ddbf2f224d58911e8 /klm/lm/config.hh
parent066dcbd87b6a59d4ef032001763eebf620fe4702 (diff)
kenlm update including being nicer to NFS
Diffstat (limited to 'klm/lm/config.hh')
-rw-r--r--klm/lm/config.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/klm/lm/config.hh b/klm/lm/config.hh
index 1f7762be..6c7fe39b 100644
--- a/klm/lm/config.hh
+++ b/klm/lm/config.hh
@@ -3,6 +3,7 @@
#include <iosfwd>
+#include "lm/lm_exception.hh"
#include "util/mmap.hh"
/* Configuration for ngram model. Separate header to reduce pollution. */
@@ -27,13 +28,16 @@ struct Config {
// ONLY EFFECTIVE WHEN READING ARPA
- typedef enum {THROW_UP, COMPLAIN, SILENT} WarningAction;
// What to do when <unk> isn't in the provided model.
WarningAction unknown_missing;
// What to do when <s> or </s> is missing from the model.
// If THROW_UP, the exception will be of type util::SpecialWordMissingException.
WarningAction sentence_marker_missing;
+ // What to do with a positive log probability. For COMPLAIN and SILENT, map
+ // to 0.
+ WarningAction positive_log_probability;
+
// The probability to substitute for <unk> if it's missing from the model.
// No effect if the model has <unk> or unknown_missing == THROW_UP.
float unknown_missing_logprob;