Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/moses
diff options
context:
space:
mode:
authorLane Schwartz <dowobeha@gmail.com>2012-03-31 00:21:39 +0400
committerLane Schwartz <dowobeha@gmail.com>2012-03-31 00:21:39 +0400
commit8c949576f6f6810ec700bba61230e41b65b1ca14 (patch)
tree11c52eb908275fd2a3b181cce238124f5d38ea4f /moses
parent8a03fd63ba61c8f8d3c00fedd54549164baa3726 (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.h9
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: