mosesdecoder/moses/SparsePhraseDictionaryFeature.h

36 lines
723 B
C
Raw Normal View History

#ifndef moses_SparsePhraseFeature_h
#define moses_SparsePhraseFeature_h
2012-09-21 14:56:01 +04:00
#include <stdexcept>
#include "FactorCollection.h"
#include "FeatureFunction.h"
namespace Moses
{
/**
* Collection of sparse features attached to each phrase pair.
**/
class SparsePhraseDictionaryFeature : public StatelessFeatureFunction {
public:
2013-01-30 15:37:14 +04:00
SparsePhraseDictionaryFeature(const std::string &line);
void Evaluate(const PhraseBasedFeatureContext& context,
2012-09-07 19:57:53 +04:00
ScoreComponentCollection* accumulator) const;
void EvaluateChart(
2012-09-21 14:56:01 +04:00
const ChartBasedFeatureContext& context,
ScoreComponentCollection*) const {
2012-09-21 14:56:01 +04:00
throw std::logic_error("SparsePhraseDictionaryFeature not valid in chart decoder");
}
};
}
#endif