diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-10-19 13:00:01 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-10-19 13:00:01 +0400 |
commit | de5276630b5fe146484380bee3d94aa164246080 (patch) | |
tree | 79e1b98fb150b3897eeebb4b9efe561259ec0384 /lm | |
parent | 5ed7513e0d4e4389905984fe0e1d9d2f38f9c50d (diff) |
Restore kenlm max order
Diffstat (limited to 'lm')
-rw-r--r-- | lm/Jamfile | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lm/Jamfile b/lm/Jamfile index 045dfee92..c537d93d4 100644 --- a/lm/Jamfile +++ b/lm/Jamfile @@ -1,12 +1,24 @@ -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 ; run left_test.cc ../util//kenutil kenlm /top//boost_unit_test_framework : : test.arpa ; run model_test.cc ../util//kenutil kenlm /top//boost_unit_test_framework : : test.arpa test_nounk.arpa ; +run partial_test.cc ../util//kenutil kenlm /top//boost_unit_test_framework : : test.arpa ; exe query : ngram_query.cc kenlm ../util//kenutil ; exe build_binary : build_binary.cc kenlm ../util//kenutil ; -exe kenlm_max_order : max_order.cc : <include>.. ; +exe kenlm_max_order : max_order.cc : <include>.. $(max-order) ; +exe fragment : fragment.cc kenlm ; -alias programs : query build_binary kenlm_max_order ; +alias programs : query build_binary kenlm_max_order fragment ; |