git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/mira-mtm5@3434 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
hieuhoang1972 2010-09-14 12:49:07 +00:00
parent 808dd43dae
commit 6b79f5ee6d
4 changed files with 14 additions and 1 deletions

View File

@ -28,6 +28,7 @@ libmoses_la_HEADERS = \
FactorCollection.h \
FactorTypeSet.h \
FeatureFunction.h \
FeatureVector.h \
File.h \
FilePtr.h \
FloydWarshall.h \
@ -155,6 +156,7 @@ libmoses_la_SOURCES = \
FactorCollection.cpp \
FactorTypeSet.cpp \
FeatureFunction.cpp \
FeatureVector.cpp \
FloydWarshall.cpp \
GenerationDictionary.cpp \
GlobalLexicalModel.cpp \

View File

@ -134,6 +134,9 @@ Parameter::Parameter()
AddParam("output-hypo-score", "Output the hypo score to stdout with the output string. For search error analysis. Default is false");
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("enable-online-command", "enable online commands to change some decoder parameters (default false); if enabled, use-persistent-cache is disabled");
}
Parameter::~Parameter()

View File

@ -237,6 +237,13 @@ bool StaticData::LoadData(Parameter *parameter)
m_useTransOptCache = false;
}
SetBooleanParameter( &m_enableOnlineCommand, "enable-online-command", false );
if (m_enableOnlineCommand == true){
VERBOSE(1,"Online commands are enabled.\n");
VERBOSE(1,"Cache for translation options is disabled.\n");
m_useTransOptCache = false;
}
//input factors
const vector<string> &inputFactorVector = m_parameter->GetParam("input-factors");

View File

@ -127,6 +127,7 @@ protected:
bool m_sourceStartPosMattersForRecombination;
bool m_recoverPath;
bool m_outputHypoScore;
bool m_enableOnlineCommand; //! flag indicating whether online commands to change some decoder parameters are enable; if yes, the persistent translation option cache is disabled
SearchAlgorithm m_searchAlgorithm;
InputTypeEnum m_inputType;