only include moses root when compiling

This commit is contained in:
Hieu Hoang 2012-11-14 13:43:04 +00:00
parent 6b3d69c5c4
commit f96b33de83
8 changed files with 25 additions and 25 deletions

View File

@ -111,6 +111,7 @@ project : requirements
<threading>multi:<library>boost_thread
<define>_FILE_OFFSET_BITS=64 <define>_LARGE_FILES
$(requirements)
<include>.
;
#Add directories here if you want their incidental targets too (i.e. tests).

View File

@ -49,7 +49,7 @@ SentenceLevelScorer.cpp
Permutation.cpp
PermutationScorer.cpp
StatisticsBasedScorer.cpp
../util//kenutil m ..//z : <include>. : : <include>. ;
../util//kenutil m ..//z ;
exe mert : mert.cpp mert_lib ../moses//ThreadPool ;

View File

@ -1,6 +1,6 @@
alias deps : IOWrapper.cpp mbr.cpp LatticeMBR.cpp TranslationAnalysis.cpp ../moses//moses ;
exe moses : Main.cpp deps : <include>. ;
exe lmbrgrid : LatticeMBRGrid.cpp deps : <include>. ;
exe moses : Main.cpp deps ;
exe lmbrgrid : LatticeMBRGrid.cpp deps ;
alias programs : moses lmbrgrid ;

View File

@ -3,7 +3,7 @@ path-constant FACTOR-LOG : bin/factor.log ;
update-if-changed $(FACTOR-LOG) $(max-factors) ;
max-factors = <define>MAX_NUM_FACTORS=$(max-factors) <dependency>$(FACTOR-LOG) ;
alias headers : ../util//kenutil : : : <include>. $(max-factors) ;
alias headers : ../util//kenutil : : : $(max-factors) ;
alias ThreadPool : ThreadPool.cpp ;

View File

@ -24,12 +24,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <iostream>
#include <fstream>
#include "LM/SRI.h"
#include "TypeDef.h"
#include "Util.h"
#include "FactorCollection.h"
#include "Phrase.h"
#include "StaticData.h"
#include "SRI.h"
#include "moses/TypeDef.h"
#include "moses/Util.h"
#include "moses/FactorCollection.h"
#include "moses/Phrase.h"
#include "moses/StaticData.h"
#include "Vocab.h"
#include "Ngram.h"

View File

@ -24,9 +24,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <string>
#include <vector>
#include "Factor.h"
#include "TypeDef.h"
#include "LM/SingleFactor.h"
#include "moses/Factor.h"
#include "moses/TypeDef.h"
#include "SingleFactor.h"
class Factor;
class Phrase;

View File

@ -54,7 +54,6 @@ Parameter::Parameter()
AddParam("input-file", "i", "location of the input file to be translated");
AddParam("inputtype", "text (0), confusion network (1), word lattice (2) (default = 0)");
AddParam("labeled-n-best-list", "print out labels for each weight type in n-best list. default is true");
AddParam("include-alignment-in-n-best", "include word alignment in the n-best list. default is false");
AddParam("lmodel-file", "location and properties of the language models");
AddParam("lmodel-dub", "dictionary upper bounds of language models");
AddParam("lmodel-oov-feature", "add language model oov feature, one per model");
@ -70,7 +69,6 @@ Parameter::Parameter()
AddParam("phrase-drop-allowed", "da", "if present, allow dropping of source words"); //da = drop any (word); see -du for comparison
AddParam("report-all-factors", "report all factors in output, not just first");
AddParam("report-all-factors-in-n-best", "Report all factors in n-best-lists. Default is false");
AddParam("report-segmentation", "t", "report phrase segmentation in the output");
#ifdef HAVE_SYNLM
AddParam("slmodel-file", "location of the syntactic language model file(s)");
AddParam("weight-slm", "slm", "weight(s) for syntactic language model");
@ -141,9 +139,6 @@ Parameter::Parameter()
AddParam("cube-pruning-diversity", "cbd", "How many hypotheses should be created for each coverage. (default = 0)");
AddParam("search-algorithm", "Which search algorithm to use. 0=normal stack, 1=cube pruning, 2=cube growing. (default = 0)");
AddParam("constraint", "Location of the file with target sentences to produce constraining the search");
AddParam("use-alignment-info", "Use word-to-word alignment: actually it is only used to output the word-to-word alignment. Word-to-word alignments are taken from the phrase table if any. Default is false.");
AddParam("print-alignment-info", "Output word-to-word alignment into the log file. Word-to-word alignments are taken from the phrase table if any. Default is false");
AddParam("print-alignment-info-in-n-best", "Include word-to-word alignment in the n-best list. Word-to-word alignments are takne from the phrase table if any. Default is false");
AddParam("link-param-count", "Number of parameters on word links when using confusion networks or lattices (default = 1)");
AddParam("description", "Source language, target language, description");
AddParam("max-chart-span", "maximum num. of source word chart rules can consume (default 10)");
@ -165,9 +160,6 @@ Parameter::Parameter()
AddParam("parsing-algorithm", "Which parsing algorithm to use. 0=CYK+, 1=scope-3. (default = 0)");
AddParam("search-algorithm", "Which search algorithm to use. 0=normal stack, 1=cube pruning, 2=cube growing, 4=stack with batched lm requests (default = 0)");
AddParam("constraint", "Location of the file with target sentences to produce constraining the search");
AddParam("use-alignment-info", "Use word-to-word alignment: actually it is only used to output the word-to-word alignment. Word-to-word alignments are taken from the phrase table if any. Default is false.");
AddParam("print-alignment-info", "Output word-to-word alignment into the log file. Word-to-word alignments are takne from the phrase table if any. Default is false");
AddParam("print-alignment-info-in-n-best", "Include word-to-word alignment in the n-best list. Word-to-word alignments are takne from the phrase table if any. Default is false");
AddParam("link-param-count", "Number of parameters on word links when using confusion networks or lattices (default = 1)");
AddParam("description", "Source language, target language, description");
@ -179,8 +171,6 @@ Parameter::Parameter()
AddParam("unknown-lhs", "file containing target lhs of unknown words. 1 per line: LHS prob");
AddParam("translation-systems", "specify multiple translation systems, each consisting of an id, followed by a set of models ids, eg '0 T1 R1 L0'");
AddParam("show-weights", "print feature weights and exit");
AddParam("alignment-output-file", "print output word alignments into given file");
AddParam("sort-word-alignment", "Sort word alignments for more consistent display. 0=no sort (default), 1=target order");
AddParam("start-translation-id", "Id of 1st input. Default = 0");
AddParam("text-type", "should be one of dev/devtest/test, used for domain adaptation features");
AddParam("output-unknowns", "Output the unknown (OOV) words to the given file, one line per sentence");
@ -188,6 +178,15 @@ Parameter::Parameter()
// Compact phrase table and reordering table.
AddParam("minlexr-memory", "Load lexical reordering table in minlexr format into memory");
AddParam("minphr-memory", "Load phrase table in minphr format into memory");
AddParam("include-alignment-in-n-best", "include word alignment in the n-best list. default is false");
AddParam("use-alignment-info", "Use word-to-word alignment: actually it is only used to output the word-to-word alignment. Word-to-word alignments are taken from the phrase table if any. Default is false.");
AddParam("print-alignment-info", "Output word-to-word alignment into the log file. Word-to-word alignments are taken from the phrase table if any. Default is false");
AddParam("print-alignment-info-in-n-best", "Include word-to-word alignment in the n-best list. Word-to-word alignments are takne from the phrase table if any. Default is false");
AddParam("alignment-output-file", "print output word alignments into given file");
AddParam("sort-word-alignment", "Sort word alignments for more consistent display. 0=no sort (default), 1=target order");
AddParam("report-segmentation", "t", "report phrase segmentation in the output");
}
Parameter::~Parameter()

View File

@ -1,10 +1,10 @@
local most-deps = [ glob *.cpp : PhraseAlignment.cpp *Test.cpp *-main.cpp ] ;
#Build .o files with include path setting, reused.
for local d in $(most-deps) {
obj $(d:B).o : $(d) : <include>. <include>.. ;
obj $(d:B).o : $(d) ;
}
#and stuff them into an alias.
alias deps : $(most-deps:B).o ..//z ..//boost_iostreams ../moses//ThreadPool ../util//kenutil : <include>. <include>.. ;
alias deps : $(most-deps:B).o ..//z ..//boost_iostreams ../moses//ThreadPool ../util//kenutil ;
#PhraseAlignment.cpp requires that main define some global variables.
#Build the mains that do not need these global variables.