2013-08-12 22:01:06 +04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ScoreComponentCollection.h"
|
|
|
|
|
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
class TargetPhrase;
|
2013-08-13 15:12:58 +04:00
|
|
|
class InputPath;
|
|
|
|
class InputType;
|
2014-05-08 20:51:45 +04:00
|
|
|
class StackVec;
|
2013-08-12 22:01:06 +04:00
|
|
|
|
|
|
|
class ChartTranslationOption
|
|
|
|
{
|
2013-09-27 12:35:24 +04:00
|
|
|
friend std::ostream& operator<<(std::ostream&, const ChartTranslationOption&);
|
2013-09-22 17:09:49 +04:00
|
|
|
|
2013-08-12 22:01:06 +04:00
|
|
|
protected:
|
|
|
|
const TargetPhrase &m_targetPhrase;
|
|
|
|
ScoreComponentCollection m_scoreBreakdown;
|
2013-09-12 21:50:09 +04:00
|
|
|
const InputPath *m_inputPath;
|
2013-09-22 17:36:50 +04:00
|
|
|
const std::vector<const Word*> *m_ruleSourceFromInputPath; // used by placeholders
|
2013-08-12 22:01:06 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
ChartTranslationOption(const TargetPhrase &targetPhrase);
|
|
|
|
|
|
|
|
const TargetPhrase &GetPhrase() const {
|
|
|
|
return m_targetPhrase;
|
|
|
|
}
|
|
|
|
|
2013-09-27 12:35:24 +04:00
|
|
|
const InputPath *GetInputPath() const {
|
|
|
|
return m_inputPath;
|
|
|
|
}
|
2015-01-07 17:25:43 +03:00
|
|
|
|
2013-09-27 12:35:24 +04:00
|
|
|
void SetInputPath(const InputPath *inputPath) {
|
|
|
|
m_inputPath = inputPath;
|
|
|
|
}
|
2013-09-22 17:36:50 +04:00
|
|
|
|
2013-09-27 12:35:24 +04:00
|
|
|
const std::vector<const Word*> *GetSourceRuleFromInputPath() const {
|
|
|
|
return m_ruleSourceFromInputPath;
|
|
|
|
}
|
|
|
|
void SetSourceRuleFromInputPath(const std::vector<const Word*> *obj) {
|
|
|
|
m_ruleSourceFromInputPath = obj;
|
|
|
|
}
|
2013-09-12 21:50:09 +04:00
|
|
|
|
2013-08-12 22:01:06 +04:00
|
|
|
const ScoreComponentCollection &GetScores() const {
|
|
|
|
return m_scoreBreakdown;
|
|
|
|
}
|
|
|
|
|
2014-08-08 19:18:24 +04:00
|
|
|
void EvaluateWithSourceContext(const InputType &input,
|
2015-01-14 14:07:42 +03:00
|
|
|
const InputPath &inputPath,
|
|
|
|
const StackVec &stackVec);
|
2013-08-12 22:01:06 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|