mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-20 07:42:21 +03:00
Merge branch 'vw_integration' of github.com:moses-smt/mosesdecoder into vw_integration
This commit is contained in:
commit
d4879855e0
@ -129,14 +129,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
|
@ -55,14 +55,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
FFState* EvaluateWhenApplied(
|
||||
const Hypothesis& cur_hypo,
|
||||
|
@ -70,14 +70,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
FFState* EvaluateWhenApplied(
|
||||
const Hypothesis& cur_hypo,
|
||||
|
@ -26,15 +26,10 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const
|
||||
{}
|
||||
|
@ -62,14 +62,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
FFState* EvaluateWhenApplied(
|
||||
const Hypothesis& cur_hypo,
|
||||
|
@ -78,12 +78,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
|
@ -55,14 +55,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
|
@ -138,15 +138,10 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const
|
||||
{}
|
||||
|
@ -64,14 +64,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
FFState* EvaluateWhenApplied(
|
||||
const Hypothesis& cur_hypo,
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include "moses/FF/SkeletonStatelessFF.h"
|
||||
#include "moses/FF/SkeletonStatefulFF.h"
|
||||
#include "moses/LM/SkeletonLM.h"
|
||||
#include "moses/FF/SkeletonTranslationOptionListFeature.h"
|
||||
#include "moses/LM/BilingualLM.h"
|
||||
#include "SkeletonChangeInput.h"
|
||||
#include "moses/TranslationModel/SkeletonPT.h"
|
||||
@ -228,6 +229,7 @@ FeatureRegistry::FeatureRegistry()
|
||||
MOSES_FNAME(SkeletonStatefulFF);
|
||||
MOSES_FNAME(SkeletonLM);
|
||||
MOSES_FNAME(SkeletonChangeInput);
|
||||
MOSES_FNAME(SkeletonTranslationOptionListFeature);
|
||||
MOSES_FNAME(SkeletonPT);
|
||||
|
||||
#ifdef HAVE_CMPH
|
||||
|
@ -12,7 +12,7 @@ namespace Moses
|
||||
|
||||
class Phrase;
|
||||
class TargetPhrase;
|
||||
class TargetPhraseCollection;
|
||||
class TranslationOptionList;
|
||||
class TranslationOption;
|
||||
class Hypothesis;
|
||||
class ChartHypothesis;
|
||||
@ -140,12 +140,8 @@ public:
|
||||
// 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const = 0;
|
||||
|
||||
virtual void SetParameter(const std::string& key, const std::string& value);
|
||||
virtual void ReadParameters();
|
||||
|
@ -90,14 +90,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -98,14 +98,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
|
@ -32,14 +32,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const
|
||||
|
@ -54,14 +54,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const
|
||||
|
@ -62,14 +62,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
|
@ -27,12 +27,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -30,14 +30,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const;
|
||||
|
@ -45,14 +45,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
|
@ -61,14 +61,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
|
@ -40,14 +40,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
virtual void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
|
@ -173,14 +173,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
FFState* EvaluateWhenApplied(
|
||||
const Hypothesis& cur_hypo,
|
||||
const FFState* prev_state,
|
||||
|
@ -46,14 +46,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
|
@ -37,14 +37,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void SetParameter(const std::string& key, const std::string& value);
|
||||
|
||||
protected:
|
||||
|
@ -29,12 +29,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -27,12 +27,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
|
@ -27,12 +27,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -47,12 +47,8 @@ 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::EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void SkeletonChangeInput::EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -29,12 +29,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const;
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const;
|
||||
|
@ -37,12 +37,8 @@ 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
|
||||
void SkeletonStatefulFF::EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
FFState* SkeletonStatefulFF::EvaluateWhenApplied(
|
||||
|
@ -41,12 +41,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const;
|
||||
|
||||
FFState* EvaluateWhenApplied(
|
||||
const Hypothesis& cur_hypo,
|
||||
|
@ -43,12 +43,9 @@ void SkeletonStatelessFF::EvaluateWithSourceContext(const InputType &input
|
||||
}
|
||||
}
|
||||
|
||||
void SkeletonStatelessFF::EvaluateWithSourceContextCollection(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhraseCollection &targetPhraseCollection
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedFutureScore) const
|
||||
void SkeletonStatelessFF::EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void SkeletonStatelessFF::EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -26,12 +26,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const;
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
ScoreComponentCollection* accumulator) const;
|
||||
|
@ -33,12 +33,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -44,12 +44,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
|
@ -29,12 +29,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
|
@ -40,12 +40,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
|
@ -26,12 +26,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
|
@ -44,12 +44,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
virtual void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -26,12 +26,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateWhenApplied(const Hypothesis& hypo,
|
||||
|
@ -60,12 +60,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void SetParameter(const std::string& key, const std::string& value);
|
||||
|
@ -200,12 +200,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
|
@ -46,12 +46,8 @@ public:
|
||||
ScoreComponentCollection* accumulator) const
|
||||
{}
|
||||
|
||||
void EvaluateWithSourceContextCollection(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhraseCollection &targetPhraseCollection
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedFutureScore = NULL) const
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void ComputeFeatures(const Phrase &source,
|
||||
|
@ -63,12 +63,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
|
@ -48,12 +48,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
|
@ -48,12 +48,8 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
|
@ -69,12 +69,8 @@ public:
|
||||
ScoreComponentCollection* accumulator) const
|
||||
{}
|
||||
|
||||
void EvaluateWithSourceContextCollection(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhraseCollection &targetPhraseCollection
|
||||
, const StackVec *stackVec
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection *estimatedFutureScore = NULL) const
|
||||
void EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
|
@ -91,6 +91,7 @@ public:
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
, ScoreComponentCollection &estimatedFutureScore) const;
|
||||
|
||||
void EvaluateWithSourceContext(const InputType &input
|
||||
, const InputPath &inputPath
|
||||
, const TargetPhrase &targetPhrase
|
||||
@ -99,15 +100,10 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -44,14 +44,9 @@ 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 EvaluateTranslationOptionListWithSourceContext(const InputType &input
|
||||
, const TranslationOptionList &translationOptionList) const
|
||||
{}
|
||||
|
||||
void EvaluateInIsolation(const Phrase &source
|
||||
, const TargetPhrase &targetPhrase
|
||||
, ScoreComponentCollection &scoreBreakdown
|
||||
|
@ -555,6 +555,7 @@ void TranslationOptionCollection::SetInputScore(const InputPath &inputPath, Part
|
||||
void TranslationOptionCollection::EvaluateWithSourceContext()
|
||||
{
|
||||
const size_t size = m_source.GetSize();
|
||||
|
||||
for (size_t startPos = 0 ; startPos < size ; ++startPos) {
|
||||
size_t maxSize = m_source.GetSize() - startPos;
|
||||
size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength();
|
||||
@ -568,10 +569,26 @@ void TranslationOptionCollection::EvaluateWithSourceContext()
|
||||
TranslationOption &transOpt = **iterTransOpt;
|
||||
transOpt.EvaluateWithSourceContext(m_source);
|
||||
}
|
||||
|
||||
EvaluateTranslatonOptionListWithSourceContext(transOptList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TranslationOptionCollection::EvaluateTranslatonOptionListWithSourceContext(
|
||||
TranslationOptionList &translationOptionList) {
|
||||
|
||||
const std::vector<FeatureFunction*> &ffs = FeatureFunction::GetFeatureFunctions();
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
for (size_t i = 0; i < ffs.size(); ++i) {
|
||||
const FeatureFunction &ff = *ffs[i];
|
||||
if (! staticData.IsFeatureFunctionIgnored(ff)) {
|
||||
ff.EvaluateTranslationOptionListWithSourceContext(m_source, translationOptionList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void TranslationOptionCollection::Sort()
|
||||
{
|
||||
size_t size = m_source.GetSize();
|
||||
|
@ -81,7 +81,7 @@ protected:
|
||||
void ProcessUnknownWord();
|
||||
//! special handling of ONE unknown words.
|
||||
virtual void ProcessOneUnknownWord(const InputPath &inputPath, size_t sourcePos, size_t length = 1, const ScorePair *inputScores = NULL);
|
||||
|
||||
|
||||
//! pruning: only keep the top n (m_maxNoTransOptPerCoverage) elements */
|
||||
void Prune();
|
||||
|
||||
@ -98,6 +98,8 @@ protected:
|
||||
|
||||
void EvaluateWithSourceContext();
|
||||
|
||||
void EvaluateTranslatonOptionListWithSourceContext(TranslationOptionList&);
|
||||
|
||||
void CacheLexReordering();
|
||||
|
||||
void GetTargetPhraseCollectionBatch();
|
||||
|
Loading…
Reference in New Issue
Block a user