mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-16 23:10:31 +03:00
estimatedScore -> estimatedScores
This commit is contained in:
parent
e87dd15f4a
commit
4078c30a42
@ -128,7 +128,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -137,7 +137,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
bool Enabled() const {
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
@ -53,7 +53,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -61,14 +61,14 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -19,7 +19,7 @@ CountNonTerms::CountNonTerms(const std::string &line)
|
||||
void CountNonTerms::EvaluateInIsolation(const Phrase &sourcePhrase
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
|
||||
|
@ -16,14 +16,14 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -33,7 +33,7 @@ bool CoveredReferenceState::operator==(const FFState& other) const
|
||||
void CoveredReferenceFeature::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{}
|
||||
|
||||
void CoveredReferenceFeature::EvaluateWithSourceContext(const InputType &input
|
||||
@ -41,7 +41,7 @@ void CoveredReferenceFeature::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
long id = input.GetTranslationId();
|
||||
boost::unordered_map<long, std::multiset<string> >::const_iterator refIt = m_refs.find(id);
|
||||
@ -54,7 +54,7 @@ void CoveredReferenceFeature::EvaluateWithSourceContext(const InputType &input
|
||||
scores.push_back(covered.size());
|
||||
|
||||
scoreBreakdown.Assign(this, scores);
|
||||
estimatedScore->Assign(this, scores);
|
||||
estimatedScores->Assign(this, scores);
|
||||
}
|
||||
|
||||
void CoveredReferenceFeature::Load()
|
||||
|
@ -56,13 +56,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
@ -85,7 +85,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
void SetContainer(const DecodeStep *container) {
|
||||
|
@ -41,7 +41,7 @@ void DeleteRules::Load()
|
||||
void DeleteRules::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &target
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
// dense scores
|
||||
size_t hash = 0;
|
||||
@ -61,7 +61,7 @@ void DeleteRules::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{}
|
||||
|
||||
void DeleteRules::EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -24,13 +24,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const;
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -62,7 +62,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ void DynamicCacheBasedLanguageModel::SetParameter(const std::string& key, const
|
||||
void DynamicCacheBasedLanguageModel::EvaluateInIsolation(const Phrase &sp
|
||||
, const TargetPhrase &tp
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
float score = m_lower_score;
|
||||
switch(m_query_type) {
|
||||
|
@ -132,14 +132,14 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -151,7 +151,7 @@ public:
|
||||
virtual void
|
||||
EvaluateInIsolation(const Phrase &source, const TargetPhrase &targetPhrase,
|
||||
ScoreComponentCollection& scoreBreakdown,
|
||||
ScoreComponentCollection& estimatedScore) const = 0;
|
||||
ScoreComponentCollection& estimatedScores) const = 0;
|
||||
|
||||
// for context-dependent processing
|
||||
static void SetupAll(TranslationTask const& task);
|
||||
@ -163,13 +163,13 @@ public:
|
||||
// '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 estimatedScore in both overloads!
|
||||
// No FF should set estimatedScores in both overloads!
|
||||
virtual void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const = 0;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const = 0;
|
||||
|
||||
// This method is called once all the translation options are retrieved from the phrase table, and
|
||||
// just before search.
|
||||
@ -177,7 +177,7 @@ public:
|
||||
// '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 estimatedScore in both overloads!
|
||||
// No FF should set estimatedScores in both overloads!
|
||||
virtual void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const = 0;
|
||||
|
||||
|
@ -171,7 +171,7 @@ float GlobalLexicalModel::GetFromCacheOrScorePhrase( const TargetPhrase& targetP
|
||||
void GlobalLexicalModel::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
scoreBreakdown.PlusEquals( this, GetFromCacheOrScorePhrase(targetPhrase) );
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const {
|
||||
@ -89,7 +89,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -100,7 +100,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
void AddFeature(ScoreComponentCollection* accumulator,
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
virtual void EvaluateWithSourceContext(const InputType &input
|
||||
@ -29,7 +29,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
virtual void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -49,7 +49,7 @@ void InputFeature::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
if (m_legacy) {
|
||||
//binary phrase-table does input feature itself
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
@ -49,7 +49,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
const TargetPhrase &targetPhrase,
|
||||
const StackVec *stackVec,
|
||||
ScoreComponentCollection& scoreBreakdown,
|
||||
ScoreComponentCollection* estimatedScore = NULL) const
|
||||
ScoreComponentCollection* estimatedScores = NULL) const
|
||||
{ }
|
||||
|
||||
void
|
||||
@ -83,7 +83,7 @@ public:
|
||||
EvaluateInIsolation(const Phrase &source,
|
||||
const TargetPhrase &targetPhrase,
|
||||
ScoreComponentCollection &scoreBreakdown,
|
||||
ScoreComponentCollection &estimatedScore) const
|
||||
ScoreComponentCollection &estimatedScores) const
|
||||
{ }
|
||||
|
||||
bool
|
||||
|
@ -30,7 +30,7 @@ MaxSpanFreeNonTermSource::MaxSpanFreeNonTermSource(const std::string &line)
|
||||
void MaxSpanFreeNonTermSource::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
targetPhrase.SetRuleSource(source);
|
||||
}
|
||||
@ -40,7 +40,7 @@ void MaxSpanFreeNonTermSource::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
const Word &targetLHS = targetPhrase.GetTargetLHS();
|
||||
|
||||
|
@ -19,14 +19,14 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
virtual void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -183,7 +183,7 @@ void Model1Feature::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
const Sentence& sentence = static_cast<const Sentence&>(input);
|
||||
float score = 0.0;
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{};
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
@ -74,7 +74,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
|
@ -27,7 +27,7 @@ std::vector<float> NieceTerminal::DefaultWeights() const
|
||||
void NieceTerminal::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
targetPhrase.SetRuleSource(source);
|
||||
}
|
||||
@ -37,7 +37,7 @@ void NieceTerminal::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
assert(stackVec);
|
||||
|
||||
|
@ -22,13 +22,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -45,7 +45,7 @@ void OpSequenceModel::Load()
|
||||
void OpSequenceModel:: EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
|
||||
osmHypothesis obj;
|
||||
@ -82,7 +82,7 @@ void OpSequenceModel:: EvaluateInIsolation(const Phrase &source
|
||||
obj.computeOSMFeature(startIndex,myBitmap);
|
||||
obj.calculateOSMProb(*OSM);
|
||||
obj.populateScores(scores,numFeatures);
|
||||
estimatedScore.PlusEquals(this, scores);
|
||||
estimatedScores.PlusEquals(this, scores);
|
||||
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -52,7 +52,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
virtual const FFState* EmptyHypothesisState(const InputType &input) const;
|
||||
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -68,7 +68,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
void SetParameter(const std::string& key, const std::string& value);
|
||||
|
@ -19,7 +19,7 @@ PhraseLengthFeature::PhraseLengthFeature(const std::string &line)
|
||||
void PhraseLengthFeature::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
// get length of source and target phrase
|
||||
size_t targetLength = targetPhrase.GetSize();
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -45,7 +45,7 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -109,7 +109,7 @@ void PhraseOrientationFeature::LoadWordList(const std::string& filename,
|
||||
void PhraseOrientationFeature::EvaluateInIsolation(const Phrase &source,
|
||||
const TargetPhrase &targetPhrase,
|
||||
ScoreComponentCollection &scoreBreakdown,
|
||||
ScoreComponentCollection &estimatedScore) const
|
||||
ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
targetPhrase.SetRuleSource(source);
|
||||
|
||||
|
@ -294,14 +294,14 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const
|
||||
{};
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -118,7 +118,7 @@ void PhrasePairFeature::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
const Phrase& source = inputPath.GetPhrase();
|
||||
if (m_domainTrigger) {
|
||||
@ -237,7 +237,7 @@ void PhrasePairFeature::EvaluateWithSourceContext(const InputType &input
|
||||
void PhrasePairFeature::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
if (m_simple) {
|
||||
util::StringStream namestr;
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
@ -62,7 +62,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const {
|
||||
|
@ -18,7 +18,7 @@ PhrasePenalty::PhrasePenalty(const std::string &line)
|
||||
void PhrasePenalty::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
if (m_perPhraseTable) {
|
||||
const PhraseDictionary *pt = targetPhrase.GetContainer();
|
||||
|
@ -17,7 +17,7 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const {
|
||||
@ -34,7 +34,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
virtual void EvaluateWithSourceContext(const InputType &input
|
||||
@ -27,7 +27,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -41,7 +41,7 @@ void RulePairUnlexicalizedSource::SetParameter(const std::string& key, const std
|
||||
void RulePairUnlexicalizedSource::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
const Factor* targetPhraseLHS = targetPhrase.GetTargetLHS()[0];
|
||||
if ( !m_glueRules && (targetPhraseLHS == m_glueTargetLHS) ) {
|
||||
|
@ -24,14 +24,14 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const
|
||||
{}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -23,7 +23,7 @@ bool IsAmbiguous(const Word &word, bool sourceSyntax)
|
||||
void RuleScope::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
if (IsGlueRule(source)) {
|
||||
return;
|
||||
@ -67,12 +67,12 @@ void RuleScope::EvaluateInIsolation(const Phrase &source
|
||||
scores[score] = 1;
|
||||
|
||||
if (m_futureCostOnly) {
|
||||
estimatedScore.PlusEquals(this, scores);
|
||||
estimatedScores.PlusEquals(this, scores);
|
||||
} else {
|
||||
scoreBreakdown.PlusEquals(this, scores);
|
||||
}
|
||||
} else if (m_futureCostOnly) {
|
||||
estimatedScore.PlusEquals(this, score);
|
||||
estimatedScores.PlusEquals(this, score);
|
||||
} else {
|
||||
scoreBreakdown.PlusEquals(this, score);
|
||||
}
|
||||
|
@ -18,14 +18,14 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
virtual void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -13,7 +13,7 @@ SetSourcePhrase::SetSourcePhrase(const std::string &line)
|
||||
void SetSourcePhrase::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
targetPhrase.SetRuleSource(source);
|
||||
}
|
||||
|
@ -18,14 +18,14 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
virtual void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -18,7 +18,7 @@ SkeletonStatefulFF::SkeletonStatefulFF(const std::string &line)
|
||||
void SkeletonStatefulFF::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{}
|
||||
|
||||
void SkeletonStatefulFF::EvaluateWithSourceContext(const InputType &input
|
||||
@ -26,7 +26,7 @@ void SkeletonStatefulFF::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{}
|
||||
|
||||
void SkeletonStatefulFF::EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -40,13 +40,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const;
|
||||
|
@ -16,7 +16,7 @@ SkeletonStatelessFF::SkeletonStatelessFF(const std::string &line)
|
||||
void SkeletonStatelessFF::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
// dense scores
|
||||
vector<float> newScores(m_numScoreComponents);
|
||||
@ -34,7 +34,7 @@ void SkeletonStatelessFF::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
if (targetPhrase.GetNumNonTerminals()) {
|
||||
vector<float> newScores(m_numScoreComponents);
|
||||
|
@ -18,13 +18,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const;
|
||||
|
@ -25,13 +25,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {};
|
||||
, ScoreComponentCollection &estimatedScores) const {};
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {};
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {};
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -288,7 +288,7 @@ void SoftSourceSyntacticConstraintsFeature::EvaluateWithSourceContext(const Inpu
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
assert(stackVec);
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
targetPhrase.SetRuleSource(source);
|
||||
};
|
||||
|
||||
@ -44,7 +44,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
|
@ -37,7 +37,7 @@ void SourceGHKMTreeInputMatchFeature::EvaluateWithSourceContext(const InputType
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
const Range& range = inputPath.GetWordsRange();
|
||||
size_t startPos = range.GetStartPos();
|
||||
|
@ -20,14 +20,14 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {};
|
||||
, ScoreComponentCollection &estimatedScores) const {};
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -64,7 +64,7 @@ bool SourceWordDeletionFeature::IsUseable(const FactorMask &mask) const
|
||||
void SourceWordDeletionFeature::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
const AlignmentInfo &alignmentInfo = targetPhrase.GetAlignTerm();
|
||||
ComputeFeatures(source, targetPhrase, &scoreBreakdown, alignmentInfo);
|
||||
|
@ -30,13 +30,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -24,7 +24,7 @@ SpanLength::SpanLength(const std::string &line)
|
||||
void SpanLength::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
targetPhrase.SetRuleSource(source);
|
||||
}
|
||||
@ -34,7 +34,7 @@ void SpanLength::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
assert(stackVec);
|
||||
|
||||
|
@ -18,14 +18,14 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
virtual void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -34,14 +34,14 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
virtual void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -17,7 +17,7 @@ SyntaxRHS::SyntaxRHS(const std::string &line)
|
||||
void SyntaxRHS::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ void SyntaxRHS::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
assert(stackVec);
|
||||
|
||||
|
@ -18,13 +18,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -53,12 +53,12 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -220,7 +220,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -230,7 +230,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
void SetParameter(const std::string& key, const std::string& value);
|
||||
|
@ -56,7 +56,7 @@ void TargetWordInsertionFeature::Load()
|
||||
void TargetWordInsertionFeature::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
const AlignmentInfo &alignmentInfo = targetPhrase.GetAlignTerm();
|
||||
ComputeFeatures(source, targetPhrase, &scoreBreakdown, alignmentInfo);
|
||||
|
@ -30,13 +30,13 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const {
|
||||
|
@ -66,13 +66,13 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {};
|
||||
, ScoreComponentCollection &estimatedScores) const {};
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {};
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {};
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {
|
||||
|
@ -21,7 +21,7 @@ UnalignedWordCountFeature::UnalignedWordCountFeature(const std::string &line)
|
||||
void UnalignedWordCountFeature::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
const AlignmentInfo &alignmentInfo = targetPhrase.GetAlignTerm();
|
||||
const size_t sourceLength = source.GetSize();
|
||||
|
@ -19,14 +19,14 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -55,7 +55,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ WordPenaltyProducer::WordPenaltyProducer(const std::string &line)
|
||||
void WordPenaltyProducer::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
float score = - (float) targetPhrase.GetNumTerminals();
|
||||
scoreBreakdown.Assign(this, score);
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const {
|
||||
}
|
||||
@ -45,7 +45,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -142,7 +142,7 @@ void WordTranslationFeature::EvaluateWithSourceContext(const InputType &input
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
const Sentence& sentence = static_cast<const Sentence&>(input);
|
||||
const AlignmentInfo &alignment = targetPhrase.GetAlignTerm();
|
||||
|
@ -47,12 +47,12 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -72,7 +72,7 @@ void LanguageModel::ReportHistoryOrder(std::ostream &out,const Phrase &phrase) c
|
||||
void LanguageModel::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const
|
||||
, ScoreComponentCollection &estimatedScores) const
|
||||
{
|
||||
// contains factors used by this LM
|
||||
float fullScore, nGramScore;
|
||||
@ -90,10 +90,10 @@ void LanguageModel::EvaluateInIsolation(const Phrase &source
|
||||
|
||||
estimateScores[0] = estimateScore;
|
||||
estimateScores[1] = 0;
|
||||
estimatedScore.Assign(this, estimateScores);
|
||||
estimatedScores.Assign(this, estimateScores);
|
||||
} else {
|
||||
scoreBreakdown.Assign(this, nGramScore);
|
||||
estimatedScore.Assign(this, estimateScore);
|
||||
estimatedScores.Assign(this, estimateScore);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,14 +92,14 @@ public:
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const;
|
||||
, ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore = NULL) const {
|
||||
, ScoreComponentCollection *estimatedScores = NULL) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
@ -191,14 +191,14 @@ size_t BilingualLM::getState(const Hypothesis& cur_hypo) const
|
||||
void BilingualLM::EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {}
|
||||
, ScoreComponentCollection &estimatedScores) const {}
|
||||
|
||||
void BilingualLM::EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const
|
||||
, ScoreComponentCollection *estimatedScores) const
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
const Phrase &source,
|
||||
const TargetPhrase &targetPhrase,
|
||||
ScoreComponentCollection &scoreBreakdown,
|
||||
ScoreComponentCollection &estimatedScore) const;
|
||||
ScoreComponentCollection &estimatedScores) const;
|
||||
|
||||
void EvaluateWithSourceContext(
|
||||
const InputType &input,
|
||||
@ -131,7 +131,7 @@ public:
|
||||
const TargetPhrase &targetPhrase,
|
||||
const StackVec *stackVec,
|
||||
ScoreComponentCollection &scoreBreakdown,
|
||||
ScoreComponentCollection *estimatedScore = NULL) const;
|
||||
ScoreComponentCollection *estimatedScores = NULL) const;
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const {};
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedScore) const {
|
||||
, ScoreComponentCollection *estimatedScores) const {
|
||||
}
|
||||
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
@ -50,7 +50,7 @@ public:
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedScore) const {
|
||||
, ScoreComponentCollection &estimatedScores) const {
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -189,16 +189,16 @@ void TargetPhrase::EvaluateInIsolation(const Phrase &source, const std::vector<F
|
||||
{
|
||||
if (ffs.size()) {
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
ScoreComponentCollection estimatedScore;
|
||||
ScoreComponentCollection estimatedScores;
|
||||
for (size_t i = 0; i < ffs.size(); ++i) {
|
||||
const FeatureFunction &ff = *ffs[i];
|
||||
if (! staticData.IsFeatureFunctionIgnored( ff )) {
|
||||
ff.EvaluateInIsolation(source, *this, m_scoreBreakdown, estimatedScore);
|
||||
ff.EvaluateInIsolation(source, *this, m_scoreBreakdown, estimatedScores);
|
||||
}
|
||||
}
|
||||
|
||||
float weightedScore = m_scoreBreakdown.GetWeightedScore();
|
||||
m_estimatedScore += estimatedScore.GetWeightedScore();
|
||||
m_estimatedScore += estimatedScores.GetWeightedScore();
|
||||
m_futureScore = weightedScore + m_estimatedScore;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user