mosesdecoder/contrib/other-builds/moses2/FeatureFunctions.h

51 lines
1.1 KiB
C
Raw Normal View History

2015-10-27 19:54:15 +03:00
/*
* FeatureFunctions.h
*
* Created on: 27 Oct 2015
* Author: hieu
*/
#ifndef FEATUREFUNCTIONS_H_
#define FEATUREFUNCTIONS_H_
#include <vector>
2015-10-27 20:35:42 +03:00
#include <string>
2015-10-27 19:54:15 +03:00
#include "moses/Parameter.h"
class System;
class FeatureFunction;
class StatefulFeatureFunction;
class PhraseTable;
class FeatureFunctions {
public:
FeatureFunctions(System &system);
virtual ~FeatureFunctions();
const std::vector<const PhraseTable*> &GetPhraseTables() const
{ return m_phraseTables; }
const std::vector<const StatefulFeatureFunction*> &GetStatefulFeatureFunctions() const
{ return m_statefulFeatureFunctions; }
2015-10-27 20:00:38 +03:00
size_t GetNumScores() const
2015-10-27 19:54:15 +03:00
{ return m_ffStartInd; }
void LoadFeatureFunctions();
2015-10-27 20:35:42 +03:00
const FeatureFunction &FindFeatureFunction(const std::string &name);
2015-10-27 19:54:15 +03:00
protected:
std::vector<const FeatureFunction*> m_featureFunctions;
std::vector<const StatefulFeatureFunction*> m_statefulFeatureFunctions;
std::vector<const PhraseTable*> m_phraseTables;
System &m_system;
size_t m_ffStartInd;
FeatureFunction *Create(const std::string &line);
};
#endif /* FEATUREFUNCTIONS_H_ */