add target phrase to arguments for Evaluate() during application to sentence

This commit is contained in:
Hieu Hoang 2013-09-18 12:35:31 +02:00
parent a4f5879fef
commit 5625d30a26
31 changed files with 30 additions and 7 deletions

View File

@ -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>

View File

@ -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);
}
}
}

View File

@ -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

View File

@ -51,6 +51,7 @@ public:
{}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
FFState* Evaluate(

View File

@ -37,6 +37,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -71,6 +71,7 @@ public:
{}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -43,6 +43,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -59,6 +59,7 @@ public:
{}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
FFState* Evaluate(

View File

@ -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);

View File

@ -82,6 +82,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -92,6 +92,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -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) {

View File

@ -39,6 +39,7 @@ public:
{}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const;
void Evaluate(const Hypothesis& hypo,

View File

@ -53,6 +53,7 @@ public:
}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -42,6 +42,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -55,6 +55,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -35,6 +35,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}

View File

@ -47,6 +47,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -28,6 +28,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}

View File

@ -33,6 +33,7 @@ public:
{}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
FFState* Evaluate(

View File

@ -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,

View File

@ -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,

View File

@ -49,6 +49,7 @@ public:
}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -194,6 +194,7 @@ public:
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -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,

View File

@ -30,6 +30,7 @@ public:
{}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}
void Evaluate(const Phrase &source

View File

@ -30,6 +30,7 @@ public:
{}
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}

View File

@ -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

View File

@ -92,6 +92,7 @@ public:
, ScoreComponentCollection &estimatedFutureScore) const;
void Evaluate(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown) const
{}

View File

@ -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

View File

@ -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);
}
}