Added new feature function hook: EvaluateWithSourceContextCollecton(...)

This commit is contained in:
Marcin Junczys-Dowmunt 2015-01-06 10:46:31 +01:00
parent ab0227ea48
commit f932058af4
48 changed files with 431 additions and 2 deletions

View File

@ -128,6 +128,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown

View File

@ -55,6 +55,15 @@ public:
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
FFState* EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,

View File

@ -69,6 +69,16 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
FFState* EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,

View File

@ -25,6 +25,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const

View File

@ -61,6 +61,16 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
FFState* EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,

View File

@ -78,6 +78,14 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown

View File

@ -54,12 +54,21 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection &estimatedFutureScore) const
{}
};
}

View File

@ -137,6 +137,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const

View File

@ -63,6 +63,16 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
FFState* EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,

View File

@ -12,6 +12,7 @@ namespace Moses
class Phrase;
class TargetPhrase;
class TargetPhraseCollection;
class TranslationOption;
class Hypothesis;
class ChartHypothesis;
@ -131,6 +132,20 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const = 0;
// This method is called once all the translation options are retrieved from the phrase table, and
// just before search.
// 'inputPath' is guaranteed to be the raw substring from the input. No factors were added or taken away
// 'stackVec' is a vector of chart cells that the RHS non-terms cover.
// It is guaranteed to be in the same order as the non-terms in the source phrase.
// For pb models, stackvec is NULL.
// No FF should set estimatedFutureScore in both overloads!
virtual void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const = 0;
virtual void SetParameter(const std::string& key, const std::string& value);
virtual void ReadParameters();

View File

@ -90,6 +90,15 @@ public:
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
};
}

View File

@ -97,6 +97,16 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown

View File

@ -32,6 +32,15 @@ public:
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -54,6 +54,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -61,6 +61,16 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown

View File

@ -27,6 +27,14 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -29,6 +29,16 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const;
void EvaluateWhenApplied(const ChartHypothesis &hypo,

View File

@ -44,6 +44,16 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown

View File

@ -60,6 +60,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown

View File

@ -39,6 +39,14 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase

View File

@ -173,6 +173,14 @@ public:
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{};
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
FFState* EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,

View File

@ -46,6 +46,14 @@ public:
, ScoreComponentCollection &estimatedFutureScore) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContext(const InputType &input
, const InputPath &inputPath
, const TargetPhrase &targetPhrase

View File

@ -37,6 +37,14 @@ public:
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void SetParameter(const std::string& key, const std::string& value);
protected:

View File

@ -29,6 +29,14 @@ public:
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -26,6 +26,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const

View File

@ -26,6 +26,14 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const

View File

@ -47,6 +47,14 @@ void SkeletonChangeInput::EvaluateWithSourceContext(const InputType &input
}
void SkeletonChangeInput::EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore) const
{}
void SkeletonChangeInput::EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -28,6 +28,14 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const;
void EvaluateWhenApplied(const ChartHypothesis &hypo,

View File

@ -37,6 +37,14 @@ void SkeletonStatefulFF::EvaluateWithSourceContext(const InputType &input
, ScoreComponentCollection *estimatedFutureScore) const
{}
void SkeletonStatefulFF::EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore) const
{}
FFState* SkeletonStatefulFF::EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,

View File

@ -40,6 +40,14 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
FFState* EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,

View File

@ -41,9 +41,16 @@ void SkeletonStatelessFF::EvaluateWithSourceContext(const InputType &input
newScores[0] = - std::numeric_limits<float>::infinity();
scoreBreakdown.PlusEquals(this, newScores);
}
}
void SkeletonStatelessFF::EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore) const
{}
void SkeletonStatelessFF::EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -25,11 +25,20 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const;
void EvaluateWhenApplied(const ChartHypothesis &hypo,
ScoreComponentCollection* accumulator) const;
void SetParameter(const std::string& key, const std::string& value);
};

View File

@ -32,6 +32,15 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const {};
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const {};

View File

@ -44,6 +44,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(
const Hypothesis& cur_hypo,
ScoreComponentCollection* accumulator) const

View File

@ -29,6 +29,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const {};

View File

@ -39,6 +39,16 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -26,6 +26,14 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const

View File

@ -44,6 +44,14 @@ public:
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -25,6 +25,15 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const;
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWhenApplied(const Hypothesis& hypo,
ScoreComponentCollection* accumulator) const
{}

View File

@ -60,6 +60,14 @@ public:
, ScoreComponentCollection &estimatedFutureScore) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void SetParameter(const std::string& key, const std::string& value);
private:

View File

@ -199,6 +199,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown

View File

@ -45,6 +45,14 @@ public:
void EvaluateWhenApplied(const ChartHypothesis &hypo,
ScoreComponentCollection* accumulator) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void ComputeFeatures(const Phrase &source,
const TargetPhrase& targetPhrase,

View File

@ -62,6 +62,16 @@ public:
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const {};
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
FFState* EvaluateWhenApplied(
const Hypothesis& cur_hypo,
const FFState* prev_state,

View File

@ -47,6 +47,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown

View File

@ -47,6 +47,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
/*

View File

@ -68,6 +68,15 @@ public:
void EvaluateWhenApplied(const ChartHypothesis &hypo,
ScoreComponentCollection* accumulator) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
};

View File

@ -99,6 +99,15 @@ public:
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
};
}

View File

@ -43,6 +43,15 @@ public:
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore) const
{}
void EvaluateWithSourceContextCollection(const InputType &input
, const InputPath &inputPath
, const TargetPhraseCollection &targetPhraseCollection
, const StackVec *stackVec
, ScoreComponentCollection &scoreBreakdown
, ScoreComponentCollection *estimatedFutureScore = NULL) const
{}
void EvaluateInIsolation(const Phrase &source
, const TargetPhrase &targetPhrase
, ScoreComponentCollection &scoreBreakdown