mosesdecoder/moses/FF/WordPenaltyProducer.h

52 lines
1.4 KiB
C
Raw Normal View History

#pragma once
#include <string>
#include "StatelessFeatureFunction.h"
namespace Moses
{
class TargetPhrase;
class ScoreComponentCollection;
class WordPenaltyProducer : public StatelessFeatureFunction
{
protected:
static WordPenaltyProducer *s_instance;
public:
static const WordPenaltyProducer& Instance() {
return *s_instance;
}
static WordPenaltyProducer& InstanceNonConst() {
return *s_instance;
}
WordPenaltyProducer(const std::string &line);
2013-05-30 15:51:40 +04:00
bool IsUseable(const FactorMask &mask) const {
return true;
}
virtual void EvaluateInIsolation(const Phrase &source
2013-05-29 21:16:15 +04:00
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection &estimatedFutureScore) const;
void EvaluateWhenApplied(const Hypothesis& hypo,
2013-09-27 12:35:24 +04:00
ScoreComponentCollection* accumulator) const
{}
void EvaluateWhenApplied(const ChartHypothesis &hypo,
2013-09-27 12:35:24 +04:00
ScoreComponentCollection* accumulator) const
{}
void EvaluateWithSourceContext(const InputType &input
2013-09-27 12:35:24 +04:00
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
};
}