2014-01-17 21:59:36 +04:00
|
|
|
#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; }
|
|
|
|
|
2014-01-20 20:12:46 +04:00
|
|
|
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
|
|
|
|
{}
|
|
|
|
|
2014-01-17 21:59:36 +04:00
|
|
|
virtual void Evaluate(const Hypothesis& hypo,
|
|
|
|
ScoreComponentCollection* accumulator) const
|
|
|
|
{}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Same for chart-based features.
|
|
|
|
**/
|
|
|
|
virtual void EvaluateChart(const ChartHypothesis &hypo,
|
|
|
|
ScoreComponentCollection* accumulator) const
|
|
|
|
{}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
|
|
|