2012-10-19 13:00:01 +04:00
|
|
|
# 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) ;
|
|
|
|
|
2012-10-19 13:16:45 +04:00
|
|
|
path-constant ORDER-LOG : bin/order.log ;
|
|
|
|
update-if-changed $(ORDER-LOG) $(max-order) ;
|
|
|
|
|
2012-10-31 18:48:29 +04:00
|
|
|
max-order += <dependency>$(ORDER-LOG) ;
|
|
|
|
|
2013-01-20 17:43:19 +04:00
|
|
|
fakelib kenlm : [ glob *.cc : *main.cc *test.cc ] ../util//kenutil : <include>.. $(max-order) : : <include>.. $(max-order) ;
|
2012-10-15 16:58:33 +04:00
|
|
|
|
|
|
|
import testing ;
|
|
|
|
|
2013-01-20 17:43:19 +04:00
|
|
|
run left_test.cc kenlm /top//boost_unit_test_framework : : test.arpa ;
|
|
|
|
run model_test.cc kenlm /top//boost_unit_test_framework : : test.arpa test_nounk.arpa ;
|
|
|
|
run partial_test.cc kenlm /top//boost_unit_test_framework : : test.arpa ;
|
2012-10-15 16:58:33 +04:00
|
|
|
|
2013-01-20 17:43:19 +04:00
|
|
|
exe query : query_main.cc kenlm ../util//kenutil ;
|
|
|
|
exe build_binary : build_binary_main.cc kenlm ../util//kenutil ;
|
|
|
|
exe kenlm_max_order : kenlm_max_order_main.cc : <include>.. $(max-order) ;
|
|
|
|
exe fragment : fragment_main.cc kenlm ;
|
2012-10-15 16:58:33 +04:00
|
|
|
|
2013-01-18 19:58:54 +04:00
|
|
|
alias programs : query build_binary kenlm_max_order fragment filter//filter : <threading>multi:<source>builder//lmplz ;
|