mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-02 17:09:36 +03:00
18 lines
527 B
C++
18 lines
527 B
C++
#include "WordPenaltyProducer.h"
|
|
#include "moses/TargetPhrase.h"
|
|
#include "moses/ScoreComponentCollection.h"
|
|
|
|
namespace Moses
|
|
{
|
|
void WordPenaltyProducer::Evaluate(const Phrase &source
|
|
, const TargetPhrase &targetPhrase
|
|
, ScoreComponentCollection &scoreBreakdown
|
|
, ScoreComponentCollection &estimatedFutureScore) const
|
|
{
|
|
float score = - (float) targetPhrase.GetNumTerminals();
|
|
scoreBreakdown.Assign(this, score);
|
|
}
|
|
|
|
}
|
|
|