Added dummy implementation of EvaluateChart to SyntacticLanguageModel.

The EvaluateChart method is now required by the parent class FeatureFunction.

This implementation simply throws a runtime error,
because the syntactic language model is incremental in nature,
and as such is not well defined for chart parsing algorithms.
This commit is contained in:
Lane Schwartz 2012-03-30 16:21:39 -04:00
parent 8a03fd63ba
commit 8c949576f6

View File

@ -4,7 +4,7 @@
#define moses_SyntacticLanguageModel_h
#include "FeatureFunction.h"
#include <stdexcept>
class YModel; // hidden model
class XModel; // observed model
@ -35,6 +35,13 @@ namespace Moses
const FFState* prev_state,
ScoreComponentCollection* accumulator) const;
FFState* EvaluateChart(const ChartHypothesis& cur_hypo,
int featureID,
ScoreComponentCollection* accumulator) const {
throw std::runtime_error("Syntactic LM can only be used with phrase-based decoder.");
}
// double perplexity();
private: