mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
Introducing Jamfiles
Currently supports kenlm, irstlm, and srilm options. bjam [--with-srilm=/path/to/sri] [--with-irstlm=/path/to/irst] -j8 Places binaries in dist/ that pass regression tests.
This commit is contained in:
parent
380b6c7197
commit
5c9b28c55a
2
.gitignore
vendored
2
.gitignore
vendored
@ -71,3 +71,5 @@ m4/ltoptions.m4
|
||||
m4/ltsugar.m4
|
||||
m4/ltversion.m4
|
||||
m4/lt~obsolete.m4
|
||||
dist
|
||||
bin
|
||||
|
1
CreateOnDisk/src/Jamfile
Normal file
1
CreateOnDisk/src/Jamfile
Normal file
@ -0,0 +1 @@
|
||||
exe CreateOnDisk : Main.cpp ../../moses/src//moses ../../OnDiskPt/src//OnDiskPt ;
|
39
Jamroot
Normal file
39
Jamroot
Normal file
@ -0,0 +1,39 @@
|
||||
project : default-build
|
||||
<threading>multi
|
||||
<warnings>on
|
||||
<variant>release
|
||||
<link>static
|
||||
;
|
||||
|
||||
lib boost_thread : : <link>shared ;
|
||||
|
||||
if [ option.get "without-trace" : no ] = no
|
||||
{
|
||||
trace = ;
|
||||
} else {
|
||||
trace = <define>TRACE_ENABLE=1 ;
|
||||
}
|
||||
|
||||
project : requirements
|
||||
<threading>multi:<define>WITH_THREADS
|
||||
<threading>multi:<library>boost_thread
|
||||
<define>_FILE_OFFSET_BITS=64 <define>_LARGE_FILES $(trace)
|
||||
;
|
||||
|
||||
path-constant TOP : . ;
|
||||
|
||||
build-project lm ;
|
||||
build-project util ;
|
||||
build-project moses/src ;
|
||||
build-project OnDiskPt/src ;
|
||||
build-project CreateOnDisk/src ;
|
||||
build-project moses-chart-cmd/src ;
|
||||
build-project moses-cmd/src ;
|
||||
|
||||
install dist :
|
||||
lm//query
|
||||
lm//build_binary
|
||||
moses-chart-cmd/src//moses_chart
|
||||
moses-cmd/src//programs
|
||||
CreateOnDisk/src//CreateOnDisk
|
||||
: <location>dist <install-type>EXE <install-dependencies>on <dll-path>$(TOP)/dist <link>shared:<install-type>LIB ;
|
1
OnDiskPt/src/Jamfile
Normal file
1
OnDiskPt/src/Jamfile
Normal file
@ -0,0 +1 @@
|
||||
lib OnDiskPt : OnDiskWrapper.cpp SourcePhrase.cpp TargetPhrase.cpp Word.cpp Phrase.cpp PhraseNode.cpp TargetPhraseCollection.cpp Vocab.cpp ../../moses/src//moses ;
|
10
lm/Jamfile
Normal file
10
lm/Jamfile
Normal file
@ -0,0 +1,10 @@
|
||||
lib lm : 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 virtual_interface.cc vocab.cc ../util//util : <include>.. : : <include>.. ;
|
||||
|
||||
import testing ;
|
||||
lib boost_unit_test_framework : : <link>shared : : <link>shared:<define>BOOST_TEST_DYN_LINK ;
|
||||
|
||||
run left_test.cc lm boost_unit_test_framework : : test.arpa ;
|
||||
run model_test.cc lm boost_unit_test_framework : : test.arpa test_nounk.arpa ;
|
||||
|
||||
exe query : ngram_query.cc lm ;
|
||||
exe build_binary : build_binary.cc lm ;
|
1
moses-chart-cmd/src/Jamfile
Normal file
1
moses-chart-cmd/src/Jamfile
Normal file
@ -0,0 +1 @@
|
||||
exe moses_chart : Main.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp ../../moses/src//moses ../../OnDiskPt/src//OnDiskPt ;
|
7
moses-cmd/src/Jamfile
Normal file
7
moses-cmd/src/Jamfile
Normal file
@ -0,0 +1,7 @@
|
||||
alias deps : ../../moses/src//moses ../../OnDiskPt/src//OnDiskPt ;
|
||||
|
||||
exe checkplf : checkplf.cpp deps ;
|
||||
exe moses : Main.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp LatticeMBR.cpp deps ;
|
||||
exe lmbrgrid : LatticeMBRGrid.cpp LatticeMBR.cpp IOWrapper.cpp deps ;
|
||||
|
||||
alias programs : checkplf moses lmbrgrid ;
|
114
moses/src/Jamfile
Normal file
114
moses/src/Jamfile
Normal file
@ -0,0 +1,114 @@
|
||||
lib z ;
|
||||
alias InputFileStream : InputFileStream.cpp z ;
|
||||
|
||||
lib moses :
|
||||
AlignmentInfo.cpp
|
||||
AlignmentInfoCollection.cpp
|
||||
BilingualDynSuffixArray.cpp
|
||||
BitmapContainer.cpp
|
||||
ChartCell.cpp
|
||||
ChartCellCollection.cpp
|
||||
ChartHypothesis.cpp
|
||||
ChartHypothesisCollection.cpp
|
||||
ChartManager.cpp
|
||||
ChartRuleLookupManager.cpp
|
||||
ChartRuleLookupManagerMemory.cpp
|
||||
ChartRuleLookupManagerOnDisk.cpp
|
||||
ChartTranslationOption.cpp
|
||||
ChartTranslationOptionCollection.cpp
|
||||
ChartTranslationOptionList.cpp
|
||||
ChartTrellisDetour.cpp
|
||||
ChartTrellisDetourQueue.cpp
|
||||
ChartTrellisNode.cpp
|
||||
ChartTrellisPath.cpp
|
||||
ConfusionNet.cpp
|
||||
DecodeFeature.cpp
|
||||
DecodeGraph.cpp
|
||||
DecodeStep.cpp
|
||||
DecodeStepGeneration.cpp
|
||||
DecodeStepTranslation.cpp
|
||||
Dictionary.cpp
|
||||
DotChart.cpp
|
||||
DotChartInMemory.cpp
|
||||
DotChartOnDisk.cpp
|
||||
DummyScoreProducers.cpp
|
||||
DynSAInclude/file.cpp
|
||||
DynSAInclude/vocab.cpp
|
||||
DynSuffixArray.cpp
|
||||
FFState.cpp
|
||||
Factor.cpp
|
||||
FactorCollection.cpp
|
||||
FactorTypeSet.cpp
|
||||
FeatureFunction.cpp
|
||||
FloydWarshall.cpp
|
||||
GenerationDictionary.cpp
|
||||
GlobalLexicalModel.cpp
|
||||
hash.cpp
|
||||
Hypothesis.cpp
|
||||
HypothesisStack.cpp
|
||||
HypothesisStackCubePruning.cpp
|
||||
HypothesisStackNormal.cpp
|
||||
InputType.cpp
|
||||
LMList.cpp
|
||||
LVoc.cpp
|
||||
LexicalReordering.cpp
|
||||
LexicalReorderingState.cpp
|
||||
LexicalReorderingTable.cpp
|
||||
Manager.cpp
|
||||
PCNTools.cpp
|
||||
Parameter.cpp
|
||||
PartialTranslOptColl.cpp
|
||||
Phrase.cpp
|
||||
PhraseDictionary.cpp
|
||||
PhraseDictionaryALSuffixArray.cpp
|
||||
PhraseDictionaryDynSuffixArray.cpp
|
||||
PhraseDictionaryHiero.cpp
|
||||
PhraseDictionaryMemory.cpp
|
||||
PhraseDictionarySCFG.cpp
|
||||
PhraseDictionaryNode.cpp
|
||||
PhraseDictionaryNodeSCFG.cpp
|
||||
PhraseDictionaryOnDisk.cpp
|
||||
PhraseDictionaryTree.cpp
|
||||
PhraseDictionaryTreeAdaptor.cpp
|
||||
PrefixTreeMap.cpp
|
||||
ReorderingConstraint.cpp
|
||||
ReorderingStack.cpp
|
||||
RuleCube.cpp
|
||||
RuleCubeItem.cpp
|
||||
RuleCubeQueue.cpp
|
||||
RuleTableLoaderCompact.cpp
|
||||
RuleTableLoaderFactory.cpp
|
||||
RuleTableLoaderHiero.cpp
|
||||
RuleTableLoaderStandard.cpp
|
||||
ScoreComponentCollection.cpp
|
||||
ScoreIndexManager.cpp
|
||||
ScoreProducer.cpp
|
||||
Search.cpp
|
||||
SearchCubePruning.cpp
|
||||
SearchNormal.cpp
|
||||
Sentence.cpp
|
||||
SentenceStats.cpp
|
||||
SquareMatrix.cpp
|
||||
StaticData.cpp
|
||||
TargetPhrase.cpp
|
||||
TargetPhraseCollection.cpp
|
||||
ThreadPool.cpp
|
||||
Timer.cpp
|
||||
TranslationOption.cpp
|
||||
TranslationOptionCollection.cpp
|
||||
TranslationOptionCollectionConfusionNet.cpp
|
||||
TranslationOptionCollectionText.cpp
|
||||
TranslationOptionList.cpp
|
||||
TranslationSystem.cpp
|
||||
TreeInput.cpp
|
||||
TrellisPath.cpp
|
||||
TrellisPathCollection.cpp
|
||||
UserMessage.cpp
|
||||
Util.cpp
|
||||
Word.cpp
|
||||
WordLattice.cpp
|
||||
WordsBitmap.cpp
|
||||
WordsRange.cpp
|
||||
XmlOption.cpp
|
||||
|
||||
InputFileStream LM//LM ../../util//util : <include>. : : <include>. ;
|
58
moses/src/LM/Jamfile
Normal file
58
moses/src/LM/Jamfile
Normal file
@ -0,0 +1,58 @@
|
||||
import option ;
|
||||
|
||||
# Shell with trailing line removed http://lists.boost.org/boost-build/2007/08/17051.php
|
||||
rule trim-nl ( str )
|
||||
{
|
||||
return [ MATCH "([^
|
||||
]*)" : $(str) ] ;
|
||||
}
|
||||
rule _shell ( cmd )
|
||||
{
|
||||
return [ trim-nl [ SHELL $(cmd) ] ] ;
|
||||
}
|
||||
|
||||
with-irstlm = [ option.get "with-irstlm" ] ;
|
||||
if $(with-irstlm) != ""
|
||||
{
|
||||
lib irstlm : : <search>$(with-irstlm)/lib ;
|
||||
obj IRST.o : IRST.cpp ../../../util//util : <include>$(with-irstlm)/include <include>.. ;
|
||||
alias irst : IRST.o irstlm : : : <define>LM_IRST ;
|
||||
echo "" ;
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ;
|
||||
echo "!!! You are linking the IRSTLM library; be sure the release is >= 5.70.02 !!!" ;
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ;
|
||||
echo "" ;
|
||||
} else {
|
||||
alias irst ;
|
||||
}
|
||||
|
||||
with-srilm = [ option.get "with-srilm" ] ;
|
||||
if $(with-srilm) != ""
|
||||
{
|
||||
if [ option.get "with-srilm-dynamic" ] != ""
|
||||
{
|
||||
alias sri-libs : srilm ;
|
||||
} else {
|
||||
sri-arch = [ option.get "with-srilm-arch" ] ;
|
||||
sri-arch ?= [ _shell $(with-srilm)/sbin/machine-type ] ;
|
||||
sri-lib = <search>$(with-srilm)/lib/$(sri-arch) <search>$(with-srilm)/flm/obj/$(sri-arch) ;
|
||||
|
||||
lib flm : : $(sri-lib) ;
|
||||
lib misc : flm : $(sri-lib) ;
|
||||
lib dstruct : misc flm : $(sri-lib) ;
|
||||
lib oolm : dstruct misc flm : $(sri-lib) ;
|
||||
|
||||
alias sri-libs : oolm dstruct misc flm ;
|
||||
}
|
||||
|
||||
obj SRI.o : SRI.cpp ../../../util//util : <include>$(with-srilm)/include <include>.. ;
|
||||
obj ParallelBackoff.o : ParallelBackoff.cpp ../../../util//util : <include>$(with-srilm)/include <include>.. ;
|
||||
alias sri : SRI.o ParallelBackoff.o sri-libs : : : <define>LM_SRI ;
|
||||
} else {
|
||||
alias sri ;
|
||||
}
|
||||
|
||||
lib LM : Base.cpp Factory.cpp Implementation.cpp Joint.cpp Ken.cpp MultiFactor.cpp Remote.cpp SingleFactor.cpp
|
||||
../../../lm//lm
|
||||
irst sri
|
||||
: <include>.. $(requirements) : : <include>.. ;
|
13
util/Jamfile
Normal file
13
util/Jamfile
Normal file
@ -0,0 +1,13 @@
|
||||
lib z ;
|
||||
|
||||
lib util : bit_packing.cc ersatz_progress.cc exception.cc file.cc file_piece.cc mmap.cc murmur_hash.cc z : <include>.. : : <include>.. ;
|
||||
|
||||
import testing ;
|
||||
lib boost_unit_test_framework : : <link>shared : : <link>shared:<define>BOOST_TEST_DYN_LINK ;
|
||||
|
||||
unit-test bit_packing_test : bit_packing_test.cc util boost_unit_test_framework ;
|
||||
run file_piece_test.cc util boost_unit_test_framework : : file_piece.cc ;
|
||||
unit-test joint_sort_test : joint_sort_test.cc util boost_unit_test_framework ;
|
||||
unit-test probing_hash_table_test : probing_hash_table_test.cc util boost_unit_test_framework ;
|
||||
unit-test sorted_uniform_test : sorted_uniform_test.cc util boost_unit_test_framework ;
|
||||
unit-test tokenize_piece_test : tokenize_piece_test.cc util boost_unit_test_framework ;
|
Loading…
Reference in New Issue
Block a user