mosesdecoder/moses/FF/UnknownWordPenaltyProducer.h

57 lines
1.4 KiB
C
Raw Normal View History

#pragma once
// $Id$
#include "StatelessFeatureFunction.h"
namespace Moses
{
class WordsRange;
/** unknown word penalty */
class UnknownWordPenaltyProducer : public StatelessFeatureFunction
{
protected:
static UnknownWordPenaltyProducer *s_instance;
public:
static const UnknownWordPenaltyProducer& Instance() {
return *s_instance;
}
static UnknownWordPenaltyProducer& InstanceNonConst() {
return *s_instance;
}
UnknownWordPenaltyProducer(const std::string &line);
2013-05-30 15:51:40 +04:00
bool IsUseable(const FactorMask &mask) const {
return true;
}
std::vector<float> DefaultWeights() 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
{}
void EvaluateInIsolation(const Phrase &source
2013-09-27 12:35:24 +04:00
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection &estimatedFutureScore) const
{}
};
}