2014-04-08 20:19:26 +04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "StatelessFeatureFunction.h"
|
|
|
|
|
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
|
|
|
|
class CountNonTerms : public StatelessFeatureFunction
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CountNonTerms(const std::string &line);
|
2014-05-19 17:34:27 +04:00
|
|
|
bool IsUseable(const FactorMask &mask) const {
|
|
|
|
return true;
|
|
|
|
}
|
2014-04-08 20:19:26 +04:00
|
|
|
|
2014-07-10 01:35:59 +04:00
|
|
|
void EvaluateInIsolation(const Phrase &source
|
2015-01-14 14:07:42 +03:00
|
|
|
, const TargetPhrase &targetPhrase
|
|
|
|
, ScoreComponentCollection &scoreBreakdown
|
2015-11-04 18:10:45 +03:00
|
|
|
, ScoreComponentCollection &estimatedScores) const;
|
2014-04-08 20:19:26 +04:00
|
|
|
|
2014-07-10 02:06:54 +04:00
|
|
|
void EvaluateWithSourceContext(const InputType &input
|
2015-01-14 14:07:42 +03:00
|
|
|
, const InputPath &inputPath
|
|
|
|
, const TargetPhrase &targetPhrase
|
|
|
|
, const StackVec *stackVec
|
|
|
|
, ScoreComponentCollection &scoreBreakdown
|
2015-11-04 18:10:45 +03:00
|
|
|
, ScoreComponentCollection *estimatedScores = NULL) const {
|
2015-01-14 14:07:42 +03:00
|
|
|
}
|
|
|
|
|
2015-01-06 15:56:13 +03:00
|
|
|
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
2015-01-14 14:07:42 +03:00
|
|
|
, const TranslationOptionList &translationOptionList) const {
|
|
|
|
}
|
2015-01-06 12:46:31 +03:00
|
|
|
|
2014-07-10 02:41:08 +04:00
|
|
|
void EvaluateWhenApplied(const Hypothesis& hypo,
|
2015-01-14 14:07:42 +03:00
|
|
|
ScoreComponentCollection* accumulator) const {
|
|
|
|
}
|
2014-04-08 20:19:26 +04:00
|
|
|
|
2014-07-10 02:54:16 +04:00
|
|
|
void EvaluateWhenApplied(
|
2014-04-08 20:19:26 +04:00
|
|
|
const ChartHypothesis& hypo,
|
2015-01-14 14:07:42 +03:00
|
|
|
ScoreComponentCollection* accumulator) const {
|
|
|
|
}
|
2014-04-08 20:19:26 +04:00
|
|
|
|
|
|
|
void SetParameter(const std::string& key, const std::string& value);
|
|
|
|
|
2015-12-10 06:17:36 +03:00
|
|
|
void Load(AllOptions::ptr const& opts);
|
2014-04-08 20:19:26 +04:00
|
|
|
protected:
|
|
|
|
bool m_all, m_sourceSyntax, m_targetSyntax;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|