properties is on 7th column, not 6th

This commit is contained in:
Hieu Hoang 2013-09-03 15:02:53 +02:00
parent 01b7f8a1e8
commit 9894941294

View File

@ -193,12 +193,6 @@ bool RuleTableLoaderStandard::Load(FormatType format
StringPiece str(*pipes); //counts
}
StringPiece propertiesString;
if (++pipes) {
StringPiece temp(*pipes);
propertiesString = temp;
}
bool isLHSEmpty = (sourcePhraseString.find_first_not_of(" \t", 0) == string::npos);
if (isLHSEmpty && !staticData.IsWordDeletionEnabled()) {
TRACE_ERR( ruleTable.GetFilePath() << ":" << count << ": pt entry contains empty target, skipping\n");
@ -239,8 +233,6 @@ bool RuleTableLoaderStandard::Load(FormatType format
targetPhrase->SetAlignmentInfo(alignString);
targetPhrase->SetTargetLHS(targetLHS);
targetPhrase->SetProperties(propertiesString);
//targetPhrase->SetDebugOutput(string("New Format pt ") + line);
if (++pipes) {
@ -248,6 +240,11 @@ bool RuleTableLoaderStandard::Load(FormatType format
targetPhrase->SetSparseScore(&ruleTable, sparseString);
}
if (++pipes) {
StringPiece propertiesString(*pipes);
targetPhrase->SetProperties(propertiesString);
}
targetPhrase->GetScoreBreakdown().Assign(&ruleTable, scoreVector);
targetPhrase->Evaluate(sourcePhrase, ruleTable.GetFeaturesToApply());