00001 #pragma once 00002 00003 #include "StatelessFeatureFunction.h" 00004 00005 namespace Moses 00006 { 00007 00008 class CountNonTerms : public StatelessFeatureFunction 00009 { 00010 public: 00011 CountNonTerms(const std::string &line); 00012 bool IsUseable(const FactorMask &mask) const { 00013 return true; 00014 } 00015 00016 void EvaluateInIsolation(const Phrase &source 00017 , const TargetPhrase &targetPhrase 00018 , ScoreComponentCollection &scoreBreakdown 00019 , ScoreComponentCollection &estimatedScores) const; 00020 00021 void EvaluateWithSourceContext(const InputType &input 00022 , const InputPath &inputPath 00023 , const TargetPhrase &targetPhrase 00024 , const StackVec *stackVec 00025 , ScoreComponentCollection &scoreBreakdown 00026 , ScoreComponentCollection *estimatedScores = NULL) const { 00027 } 00028 00029 void EvaluateTranslationOptionListWithSourceContext(const InputType &input 00030 , const TranslationOptionList &translationOptionList) const { 00031 } 00032 00033 void EvaluateWhenApplied(const Hypothesis& hypo, 00034 ScoreComponentCollection* accumulator) const { 00035 } 00036 00037 void EvaluateWhenApplied( 00038 const ChartHypothesis& hypo, 00039 ScoreComponentCollection* accumulator) const { 00040 } 00041 00042 void SetParameter(const std::string& key, const std::string& value); 00043 00044 void Load(AllOptions::ptr const& opts); 00045 protected: 00046 bool m_all, m_sourceSyntax, m_targetSyntax; 00047 }; 00048 00049 } 00050