diff options
author | Lane Schwartz <dowobeha@gmail.com> | 2012-03-31 00:21:39 +0400 |
---|---|---|
committer | Lane Schwartz <dowobeha@gmail.com> | 2012-03-31 00:21:39 +0400 |
commit | 8c949576f6f6810ec700bba61230e41b65b1ca14 (patch) | |
tree | 11c52eb908275fd2a3b181cce238124f5d38ea4f /moses | |
parent | 8a03fd63ba61c8f8d3c00fedd54549164baa3726 (diff) |
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.
Diffstat (limited to 'moses')
-rw-r--r-- | moses/src/SyntacticLanguageModel.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/moses/src/SyntacticLanguageModel.h b/moses/src/SyntacticLanguageModel.h index 3497d3dc4..61378d678 100644 --- a/moses/src/SyntacticLanguageModel.h +++ b/moses/src/SyntacticLanguageModel.h @@ -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: |