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