mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
refactor class PhraseDictionaryFeature
This commit is contained in:
parent
4ca673df8e
commit
4ecdeac694
@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.162355801">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.162355801" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
@ -74,7 +76,6 @@
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
<listOptionValue builtIn="false" value="rt"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.128214028" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.461114338">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.461114338" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
@ -72,7 +74,6 @@
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="rt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.userobjs.1542590830" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../boost/lib64/libboost_system-mt.a""/>
|
||||
|
@ -773,7 +773,7 @@ bool StaticData::LoadPhraseTables()
|
||||
|
||||
// MAIN LOOP
|
||||
for(size_t currDict = 0 ; currDict < translationVector.size(); currDict++) {
|
||||
//string ptLine = "PhraseModel ";
|
||||
stringstream ptLine("PhraseModel ");
|
||||
|
||||
vector<string> token = Tokenize(translationVector[currDict]);
|
||||
const vector<float> &weights = m_parameter->GetWeights("PhraseModel", currDict);
|
||||
@ -782,9 +782,14 @@ bool StaticData::LoadPhraseTables()
|
||||
UserMessage::Add("Phrase table specification in old 4-field format. No longer supported");
|
||||
return false;
|
||||
}
|
||||
CHECK(token.size() >= 5);
|
||||
|
||||
PhraseTableImplementation implementation = (PhraseTableImplementation) Scan<int>(token[0]);
|
||||
CHECK(token.size() >= 5);
|
||||
ptLine << "implementation=" << implementation << " ";
|
||||
ptLine << "input-factor=" << token[1] << " ";
|
||||
ptLine << "output-factor=" << token[2] << " ";
|
||||
ptLine << "path=" << token[4] << " ";
|
||||
|
||||
//characteristics of the phrase table
|
||||
|
||||
vector<FactorType> input = Tokenize<FactorType>(token[1], ",")
|
||||
@ -825,6 +830,9 @@ bool StaticData::LoadPhraseTables()
|
||||
m_numRealWordsInInput = 0;
|
||||
}
|
||||
|
||||
ptLine << "num-features=" << numScoreComponent << " ";
|
||||
ptLine << "num-input-features=" << (currDict==0 ? m_numInputScores + m_numRealWordsInInput : 0) << " ";
|
||||
|
||||
string targetPath, alignmentsFile;
|
||||
if (implementation == SuffixArray) {
|
||||
targetPath = token[5];
|
||||
|
Loading…
Reference in New Issue
Block a user