/* * FeatureFunctions.h * * Created on: 27 Oct 2015 * Author: hieu */ #ifndef FEATUREFUNCTIONS_H_ #define FEATUREFUNCTIONS_H_ #include #include #include "moses/Parameter.h" class System; class FeatureFunction; class StatefulFeatureFunction; class PhraseTable; class Manager; class PhraseBase; class Phrase; class TargetPhrase; class Scores; class FeatureFunctions { public: FeatureFunctions(System &system); virtual ~FeatureFunctions(); const std::vector &GetPhraseTables() const { return m_phraseTables; } const std::vector &GetStatefulFeatureFunctions() const { return m_statefulFeatureFunctions; } size_t GetNumScores() const { return m_ffStartInd; } void Create(); void Load(); const FeatureFunction &FindFeatureFunction(const std::string &name) const; virtual void EvaluateInIsolation(const System &system, const PhraseBase &source, const TargetPhrase &targetPhrase, Scores &scores, Scores *estimatedFutureScores) const; protected: std::vector m_featureFunctions; std::vector m_statefulFeatureFunctions; std::vector m_phraseTables; System &m_system; size_t m_ffStartInd; FeatureFunction *Create(const std::string &line); }; #endif /* FEATUREFUNCTIONS_H_ */