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

Jamfile « lm - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 227b220142bad3d58ce61a62be7d9de05bdce59a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 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) ;

wrappers = ;
local with-nplm = [ option.get "with-nplm" ] ;
if $(with-nplm) {
  lib neuralLM : : <search>$(with-nplm)/src ;
  obj nplm.o : wrappers/nplm.cc : <include>.. <include>$(with-nplm)/src <cxxflags>-fopenmp ;
  alias nplm : nplm.o neuralLM ..//boost_thread : : : <cxxflags>-fopenmp <linkflags>-fopenmp <define>WITH_NPLM <library>..//boost_thread ;
  wrappers += nplm ;
}

fakelib kenlm : $(wrappers) [ glob *.cc : *main.cc *test.cc ] ../util//kenutil : <include>.. $(max-order) : : <include>.. $(max-order) ;

import testing ;

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 ;

exes = ;
for local p in [ glob *_main.cc ] {
  local name = [ MATCH "(.*)\_main.cc" : $(p) ] ;
  exe $(name) : $(p) kenlm ;
  exes += $(name) ;
}

alias programs : $(exes) filter//filter builder//dump_counts : <threading>multi:<source>builder//lmplz ;