mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-17 07:20:48 +03:00
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:
parent
5761322d09
commit
ee3bf08334
@ -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;
|
||||
|
@ -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) ?
|
||||
|
Loading…
Reference in New Issue
Block a user