mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 05:14:36 +03:00
add target phrase to arguments for Evaluate() during application to sentence
This commit is contained in:
parent
a4f5879fef
commit
5625d30a26
@ -1116,11 +1116,6 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/FeatureFunction.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/ForceDecoding.h</name>
|
||||
<type>1</type>
|
||||
<location>/Users/hieuhoang/unison/workspace/github/mosesdecoder/moses/FF/ForceDecoding.h</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/GlobalLexicalModel.cpp</name>
|
||||
<type>1</type>
|
||||
|
@ -16,7 +16,7 @@ void ChartTranslationOption::Evaluate(const InputType &input, const InputPath &i
|
||||
|
||||
for (size_t i = 0; i < ffs.size(); ++i) {
|
||||
const FeatureFunction &ff = *ffs[i];
|
||||
ff.Evaluate(input, inputPath, m_scoreBreakdown);
|
||||
ff.Evaluate(input, inputPath, m_targetPhrase, m_scoreBreakdown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,6 +120,7 @@ public:
|
||||
ScoreComponentCollection* accumulator) const;
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
{}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
FFState* Evaluate(
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -71,6 +71,7 @@ public:
|
||||
{}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -59,6 +59,7 @@ public:
|
||||
{}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
FFState* Evaluate(
|
||||
|
@ -107,6 +107,7 @@ public:
|
||||
// Currently not used by any FF. Not called by moses_chart
|
||||
virtual void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const = 0;
|
||||
|
||||
virtual void SetParameter(const std::string& key, const std::string& value);
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -92,6 +92,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -40,6 +40,7 @@ void InputFeature::SetParameter(const std::string& key, const std::string& value
|
||||
|
||||
void InputFeature::Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{
|
||||
if (m_legacy) {
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
{}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const;
|
||||
|
||||
void Evaluate(const Hypothesis& hypo,
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
{}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
FFState* Evaluate(
|
||||
|
@ -23,6 +23,7 @@ public:
|
||||
{}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
virtual void Evaluate(const Hypothesis& hypo,
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
, ScoreComponentCollection &estimatedFutureScore) const;
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Hypothesis& hypo,
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -194,6 +194,7 @@ public:
|
||||
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
, ScoreComponentCollection &estimatedFutureScore) const;
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Hypothesis& hypo,
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
{}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
{}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
ScoreComponentCollection* accumulator) const;
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -92,6 +92,7 @@ public:
|
||||
, ScoreComponentCollection &estimatedFutureScore) const;
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
void EvaluateChart(const ChartHypothesis&, ScoreComponentCollection*) const {}
|
||||
void Evaluate(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown) const
|
||||
{}
|
||||
void Evaluate(const Phrase &source
|
||||
|
@ -145,7 +145,7 @@ void TargetPhrase::Evaluate(const InputType &input, const InputPath &inputPath)
|
||||
|
||||
for (size_t i = 0; i < ffs.size(); ++i) {
|
||||
const FeatureFunction &ff = *ffs[i];
|
||||
ff.Evaluate(input, inputPath, m_scoreBreakdown);
|
||||
ff.Evaluate(input, inputPath, *this, m_scoreBreakdown);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user