Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLane Schwartz <dowobeha@gmail.com>2012-08-09 00:22:13 +0400
committerLane Schwartz <dowobeha@gmail.com>2012-08-09 00:22:13 +0400
commitda5429318b4c8b4a6d06109fcbdc100ea230202f (patch)
treeda3a41787d009d30b871de11f777d3fef625dc10 /Jamroot
parentc55931f3524e9e31cb8f76983f150da76b42680d (diff)
KenLM maximum n-gram order can now be set via a compile-time flag
Diffstat (limited to 'Jamroot')
-rw-r--r--Jamroot11
1 files changed, 11 insertions, 0 deletions
diff --git a/Jamroot b/Jamroot
index 900f5dc37..bf983d1a5 100644
--- a/Jamroot
+++ b/Jamroot
@@ -56,6 +56,7 @@
#
# --without-libsegfault does not link with libSegFault
#
+# --max-kenlm-order maximum ngram order that kenlm can process (default 6)
#
#CONTROLLING THE BUILD
#-a to build from scratch
@@ -83,6 +84,16 @@ if [ option.get "with-cmph" ] {
requirements += <define>HAVE_CMPH ;
}
+# If you need higher order, change this option
+# Having this limit means that State can be
+# (KENLM_MAX_ORDER - 1) * sizeof(float) bytes instead of
+# sizeof(float*) + (KENLM_MAX_ORDER - 1) * sizeof(float) + malloc overhead
+max-order = [ option.get "max-kenlm-order" : 6 : 6 ] ;
+requirements += <define>KENLM_MAX_ORDER=$(max-order) ;
+if ( $(max-order) != 6 ) {
+ echo "Setting KenLM maximum n-gram order to $(max-order)" ;
+}
+
project : default-build
<threading>multi
<warnings>on