wer producer

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/branches/mt3_constraint@2047 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
hieuhoang1972 2009-01-29 18:13:14 +00:00
parent 5761322d09
commit ee3bf08334
2 changed files with 2 additions and 4 deletions

View File

@ -371,9 +371,7 @@ void Hypothesis::CalcScore(const SquareMatrix &futureScore, const Phrase *constr
const WERScoreProducer *werProducer = staticData.GetWERScoreProducer();
float werScore = werProducer->CalculateScore(hypPhrase, *constraint);
m_scoreBreakdown.PlusEquals(werProducer, werScore);
cerr << m_scoreBreakdown.GetWeightedScore() << " " << hypPhrase << endl;
m_scoreBreakdown.Assign(werProducer, werScore);
// TOTAL
m_totalScore = m_scoreBreakdown.InnerProduct(staticData.GetAllWeights()) + m_futureScore;

View File

@ -263,7 +263,7 @@ bool StaticData::LoadData(Parameter *parameter)
m_allWeights.push_back(m_weightUnknownWord);
m_WERScoreProducer = new WERScoreProducer(m_scoreIndexManager);
m_allWeights.push_back(1.0);
m_allWeights.push_back(-1.0);
// reordering constraints
m_maxDistortion = (m_parameter->GetParam("distortion-limit").size() > 0) ?