summaryrefslogtreecommitdiff
path: root/klm/lm
diff options
context:
space:
mode:
Diffstat (limited to 'klm/lm')
-rw-r--r--klm/lm/max_order.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/klm/lm/max_order.hh b/klm/lm/max_order.hh
new file mode 100644
index 00000000..71cd23dd
--- /dev/null
+++ b/klm/lm/max_order.hh
@@ -0,0 +1,14 @@
+#ifndef LM_MAX_ORDER__
+#define LM_MAX_ORDER__
+namespace lm {
+namespace ngram {
+// If you need higher order, change this and recompile.
+// Having this limit means that State can be
+// (kMaxOrder - 1) * sizeof(float) bytes instead of
+// sizeof(float*) + (kMaxOrder - 1) * sizeof(float) + malloc overhead
+const unsigned char kMaxOrder = 6;
+
+} // namespace ngram
+} // namespace lm
+
+#endif // LM_MAX_ORDER__