mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 05:55:02 +03:00
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:
parent
8a03fd63ba
commit
8c949576f6
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user