diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-09-17 20:22:00 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-09-17 20:22:00 +0400 |
commit | 3271d86c25cd151646babd93b4d90428b2bcc4b1 (patch) | |
tree | c2cc2accffa0eeefbd5e7a2e9a8e583956db8ace /moses/TargetPhrase.h | |
parent | 6c739bcbf56ed7386aefb987d7c51a45242cd06f (diff) |
add option to store rule source in target phrase
Diffstat (limited to 'moses/TargetPhrase.h')
-rw-r--r-- | moses/TargetPhrase.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/moses/TargetPhrase.h b/moses/TargetPhrase.h index 08947d9c5..a27d8f44b 100644 --- a/moses/TargetPhrase.h +++ b/moses/TargetPhrase.h @@ -53,6 +53,7 @@ private: const AlignmentInfo* m_alignTerm, *m_alignNonTerm; const Word *m_lhsTarget; + mutable Phrase *m_ruleSource; // to be set by the feature function that needs it. std::map<std::string, std::string> m_properties; public: @@ -123,6 +124,13 @@ public: return *m_alignNonTerm; } + const Phrase *GetRuleSource() const + { return m_ruleSource; } + + // To be set by the FF that needs it, by default the rule source = NULL + // make a copy of the source side of the rule + void SetRuleSource(const Phrase &ruleSource) const; + void SetProperties(const StringPiece &str); void SetProperty(const std::string &key, const std::string &value) { m_properties[key] = value; |