mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-28 22:45:50 +03:00
30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
# 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) ;
|
|
|
|
path-constant ORDER-LOG : bin/order.log ;
|
|
update-if-changed $(ORDER-LOG) $(max-order) ;
|
|
|
|
max-order += <dependency>$(ORDER-LOG) ;
|
|
|
|
fakelib 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>.. $(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>.. $(max-order) ;
|
|
exe fragment : fragment.cc kenlm ;
|
|
|
|
alias programs : query build_binary kenlm_max_order fragment ;
|