mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
Fix the evaluate method for GLM. GLM should evaluate transopts after
initializing the input
This commit is contained in:
parent
1c365788dc
commit
ef3199de3e
@ -173,10 +173,12 @@ float GlobalLexicalModel::GetFromCacheOrScorePhrase( const TargetPhrase& targetP
|
|||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GlobalLexicalModel::EvaluateInIsolation(const Phrase &source
|
void GlobalLexicalModel::EvaluateWithSourceContext(const InputType &input
|
||||||
|
, const InputPath &inputPath
|
||||||
, const TargetPhrase &targetPhrase
|
, const TargetPhrase &targetPhrase
|
||||||
|
, const StackVec *stackVec
|
||||||
, ScoreComponentCollection &scoreBreakdown
|
, ScoreComponentCollection &scoreBreakdown
|
||||||
, ScoreComponentCollection &estimatedScores) const
|
, ScoreComponentCollection *estimatedScores) const
|
||||||
{
|
{
|
||||||
scoreBreakdown.PlusEquals( this, GetFromCacheOrScorePhrase(targetPhrase) );
|
scoreBreakdown.PlusEquals( this, GetFromCacheOrScorePhrase(targetPhrase) );
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,8 @@ public:
|
|||||||
void EvaluateInIsolation(const Phrase &source
|
void EvaluateInIsolation(const Phrase &source
|
||||||
, const TargetPhrase &targetPhrase
|
, const TargetPhrase &targetPhrase
|
||||||
, ScoreComponentCollection &scoreBreakdown
|
, ScoreComponentCollection &scoreBreakdown
|
||||||
, ScoreComponentCollection &estimatedScores) const;
|
, ScoreComponentCollection &estimatedScores) const {
|
||||||
|
}
|
||||||
|
|
||||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||||
ScoreComponentCollection* accumulator) const {
|
ScoreComponentCollection* accumulator) const {
|
||||||
@ -89,8 +90,7 @@ public:
|
|||||||
, const TargetPhrase &targetPhrase
|
, const TargetPhrase &targetPhrase
|
||||||
, const StackVec *stackVec
|
, const StackVec *stackVec
|
||||||
, ScoreComponentCollection &scoreBreakdown
|
, ScoreComponentCollection &scoreBreakdown
|
||||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||||
}
|
|
||||||
|
|
||||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||||
, const TranslationOptionList &translationOptionList) const {
|
, const TranslationOptionList &translationOptionList) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user