mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
23 lines
553 B
C++
23 lines
553 B
C++
|
|
#include "PhrasePenalty.h"
|
|
#include "moses/ScoreComponentCollection.h"
|
|
|
|
namespace Moses
|
|
{
|
|
PhrasePenalty::PhrasePenalty(const std::string &line)
|
|
: StatelessFeatureFunction("PhrasePenalty",1, line)
|
|
{
|
|
ReadParameters();
|
|
}
|
|
|
|
void PhrasePenalty::Evaluate(const Phrase &source
|
|
, const TargetPhrase &targetPhrase
|
|
, ScoreComponentCollection &scoreBreakdown
|
|
, ScoreComponentCollection &estimatedFutureScore) const
|
|
{
|
|
scoreBreakdown.Assign(this, 1.0f);
|
|
}
|
|
|
|
} // namespace
|
|
|