mosesdecoder/moses/FF/HyperParameterAsWeight.h

50 lines
1.2 KiB
C
Raw Normal View History

#pragma once
#include "StatelessFeatureFunction.h"
namespace Moses
{
class DecodeStep;
/**
* Baseclass for phrase-table or generation table feature function
**/
class HyperParameterAsWeight : public StatelessFeatureFunction
{
public:
HyperParameterAsWeight(const std::string &line);
2014-01-20 21:01:53 +04:00
virtual bool IsUseable(const FactorMask &mask) const
{ return true; }
virtual void Evaluate(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection &estimatedFutureScore) const
{}
2014-01-20 21:01:53 +04:00
virtual void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void Evaluate(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}
/**
* Same for chart-based features.
**/
virtual void EvaluateChart(const ChartHypothesis &hypo,
ScoreComponentCollection* accumulator) const
{}
};
} // namespace