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/FF
diff options
context:
space:
mode:
authorPrashant Mathur <pramathur@ebay.com>2016-05-03 13:01:43 +0300
committerPrashant Mathur <pramathur@ebay.com>2016-05-03 13:01:43 +0300
commitef3199de3ed1640fd22feebf8279bed83424628f (patch)
tree3a484f689132a50168961bd82f495e28d3cccde7 /moses/FF
parent1c365788dc526c0bd360467722242de37a2c7f6b (diff)
Fix the evaluate method for GLM. GLM should evaluate transopts after
initializing the input
Diffstat (limited to 'moses/FF')
-rw-r--r--moses/FF/GlobalLexicalModel.cpp6
-rw-r--r--moses/FF/GlobalLexicalModel.h6
2 files changed, 7 insertions, 5 deletions
diff --git a/moses/FF/GlobalLexicalModel.cpp b/moses/FF/GlobalLexicalModel.cpp
index 986b427b0..fa4b49685 100644
--- a/moses/FF/GlobalLexicalModel.cpp
+++ b/moses/FF/GlobalLexicalModel.cpp
@@ -173,10 +173,12 @@ float GlobalLexicalModel::GetFromCacheOrScorePhrase( const TargetPhrase& targetP
return score;
}
-void GlobalLexicalModel::EvaluateInIsolation(const Phrase &source
+void GlobalLexicalModel::EvaluateWithSourceContext(const InputType &input
+ , const InputPath &inputPath
, const TargetPhrase &targetPhrase
+ , const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
- , ScoreComponentCollection &estimatedScores) const
+ , ScoreComponentCollection *estimatedScores) const
{
scoreBreakdown.PlusEquals( this, GetFromCacheOrScorePhrase(targetPhrase) );
}
diff --git a/moses/FF/GlobalLexicalModel.h b/moses/FF/GlobalLexicalModel.h
index 1701195f7..6957d7d7c 100644
--- a/moses/FF/GlobalLexicalModel.h
+++ b/moses/FF/GlobalLexicalModel.h
@@ -75,7 +75,8 @@ public:
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
- , ScoreComponentCollection &estimatedScores) const;
+ , ScoreComponentCollection &estimatedScores) const {
+ }
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const {
@@ -89,8 +90,7 @@ public:
, const TargetPhrase &targetPhrase
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
- , ScoreComponentCollection *estimatedScores = NULL) const {
- }
+ , ScoreComponentCollection *estimatedScores = NULL) const;
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
, const TranslationOptionList &translationOptionList) const {