diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-08-18 20:07:53 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-08-18 20:07:53 +0400 |
commit | b317522563feb4ca7ff978a0de661ec2189934ea (patch) | |
tree | 5c7ce7b4e19b3674f2e98f31e31df5470f407ee3 /lm | |
parent | 1a57ceeb1e7f9913a4ea0f0de37a322645c9d2eb (diff) |
Move max-order to lm directory and direct dependencies.
Diffstat (limited to 'lm')
-rw-r--r-- | lm/Jamfile | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lm/Jamfile b/lm/Jamfile index 0725886df..88455709b 100644 --- a/lm/Jamfile +++ b/lm/Jamfile @@ -1,4 +1,14 @@ -lib kenlm : bhiksha.cc binary_format.cc config.cc lm_exception.cc model.cc quantize.cc read_arpa.cc search_hashed.cc search_trie.cc trie.cc trie_sort.cc value_build.cc virtual_interface.cc vocab.cc ../util//kenutil : <include>.. : : <include>.. <library>../util//kenutil ; +# 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 ] ; +if ( $(max-order) != 6 ) { + echo "Setting KenLM maximum n-gram order to $(max-order)" ; +} +max-order = <define>KENLM_MAX_ORDER=$(max-order) ; + +lib kenlm : bhiksha.cc binary_format.cc config.cc lm_exception.cc model.cc quantize.cc read_arpa.cc search_hashed.cc search_trie.cc trie.cc trie_sort.cc value_build.cc virtual_interface.cc vocab.cc ../util//kenutil : <include>.. $(max-order) : : <include>.. <library>../util//kenutil $(max-order) ; import testing ; @@ -7,4 +17,4 @@ run model_test.cc ../util//kenutil kenlm ..//boost_unit_test_framework : : test. exe query : ngram_query.cc kenlm ../util//kenutil ; exe build_binary : build_binary.cc kenlm ../util//kenutil ; -exe kenlm_max_order : max_order.cc ; +exe kenlm_max_order : max_order.cc : $(max-order) ; |