mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-28 14:32:38 +03:00
24 lines
599 B
C++
24 lines
599 B
C++
#include "ChartTranslationOptions.h"
|
|
#include "InputType.h"
|
|
#include "InputPath.h"
|
|
|
|
namespace Moses
|
|
{
|
|
ChartTranslationOption::ChartTranslationOption(const TargetPhrase &targetPhrase)
|
|
:m_targetPhrase(targetPhrase)
|
|
,m_scoreBreakdown(targetPhrase.GetScoreBreakdown())
|
|
{
|
|
}
|
|
|
|
void ChartTranslationOption::Evaluate(const InputType &input, const InputPath &inputPath)
|
|
{
|
|
const std::vector<FeatureFunction*> &ffs = FeatureFunction::GetFeatureFunctions();
|
|
|
|
for (size_t i = 0; i < ffs.size(); ++i) {
|
|
const FeatureFunction &ff = *ffs[i];
|
|
ff.Evaluate(input, inputPath, m_scoreBreakdown);
|
|
}
|
|
}
|
|
}
|
|
|