use new constructor

This commit is contained in:
Hieu Hoang 2013-02-03 23:55:05 +00:00
parent ed4921c0c9
commit 63cd5d4faf
2 changed files with 16 additions and 0 deletions

View File

@ -838,6 +838,9 @@ bool StaticData::LoadPhraseTables()
if (implementation == SuffixArray) {
targetPath = token[5];
alignmentsFile= token[6];
ptLine << "target-path=" << targetPath << " ";
ptLine << "alignment-path=" << alignmentsFile << " ";
}
//This is needed for regression testing, but the phrase table
@ -846,6 +849,8 @@ bool StaticData::LoadPhraseTables()
PrintUserTime(string("Start loading PhraseTable ") + filePath);
VERBOSE(1,"filePath: " << filePath <<endl);
PhraseDictionaryFeature* pdf = new PhraseDictionaryFeature(ptLine.str());
/*
PhraseDictionaryFeature* pdf = new PhraseDictionaryFeature(
implementation
, numScoreComponent
@ -855,6 +860,7 @@ bool StaticData::LoadPhraseTables()
, filePath
, maxTargetPhrase[currDict]
, targetPath, alignmentsFile);
*/
//optional create sparse phrase feature
if (m_sparsePhraseDictionary.size() > currDict) {

View File

@ -81,7 +81,17 @@ PhraseDictionaryFeature::PhraseDictionaryFeature(const std::string &line)
else if (args[0] == "table-limit") {
m_tableLimit = Scan<size_t>(args[1]);
}
else if (args[0] == "target-path") {
m_targetFile = args[1];
}
else if (args[0] == "alignment-path") {
m_alignmentsFile = args[1];
}
else {
UserMessage::Add("Unknown argument " + args[0]);
abort();
}
} // for (size_t i = 0; i < toks.size(); ++i) {
}