diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-08-12 13:34:45 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-08-12 13:34:45 +0400 |
commit | 46fce4029ccc13e2cd75710f3f03cc4982fd507e (patch) | |
tree | afa6d5aead96a623a414d2e05925f8b5dd1dd829 /moses/ChartTranslationOptions.h | |
parent | 8756ad8ffde618c31c362823c7c585c019c683f0 (diff) |
create ChartTranslationOption class that store pointer to target phrase. Don't store target phrase itself. QUicker, but still not as quick as storing pointer to target phrase in hypo
Diffstat (limited to 'moses/ChartTranslationOptions.h')
-rw-r--r-- | moses/ChartTranslationOptions.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/moses/ChartTranslationOptions.h b/moses/ChartTranslationOptions.h index 94bf032a8..38698a2ca 100644 --- a/moses/ChartTranslationOptions.h +++ b/moses/ChartTranslationOptions.h @@ -31,13 +31,29 @@ namespace Moses { +class ChartTranslationOption +{ +protected: + const TargetPhrase &m_targetPhrase; + +public: + ChartTranslationOption(const TargetPhrase &targetPhrase); + + const TargetPhrase &GetPhrase() const + { return m_targetPhrase; } + + const ScoreComponentCollection &GetScores() const + { return m_targetPhrase.GetScoreBreakdown(); } + +}; + /** Similar to a DottedRule, but contains a direct reference to a list * of translations and provdes an estimate of the best score. For a specific range in the input sentence */ class ChartTranslationOptions { public: - typedef std::vector<boost::shared_ptr<TargetPhrase> > CollType; + typedef std::vector<boost::shared_ptr<ChartTranslationOption> > CollType; /** Constructor \param targetPhraseColl @todo dunno |