2013-08-12 22:01:06 +04:00
|
|
|
#include "ChartTranslationOptions.h"
|
2013-08-13 15:12:58 +04:00
|
|
|
#include "InputType.h"
|
|
|
|
#include "InputPath.h"
|
2013-08-12 22:01:06 +04:00
|
|
|
|
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
ChartTranslationOption::ChartTranslationOption(const TargetPhrase &targetPhrase)
|
|
|
|
:m_targetPhrase(targetPhrase)
|
|
|
|
,m_scoreBreakdown(targetPhrase.GetScoreBreakdown())
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-08-13 15:16:55 +04:00
|
|
|
void ChartTranslationOption::Evaluate(const InputType &input, const InputPath &inputPath)
|
2013-08-13 15:12:58 +04:00
|
|
|
{
|
|
|
|
const std::vector<FeatureFunction*> &ffs = FeatureFunction::GetFeatureFunctions();
|
|
|
|
|
|
|
|
for (size_t i = 0; i < ffs.size(); ++i) {
|
2013-08-16 00:14:04 +04:00
|
|
|
const FeatureFunction &ff = *ffs[i];
|
|
|
|
ff.Evaluate(input, inputPath, m_scoreBreakdown);
|
2013-08-13 15:12:58 +04:00
|
|
|
}
|
|
|
|
}
|
2013-08-12 22:01:06 +04:00
|
|
|
}
|
|
|
|
|