diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-08-08 18:03:01 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-08-08 18:03:01 +0400 |
commit | a60bbbf892c982c5a93549142166db0d654c7e11 (patch) | |
tree | 74d079d39207e108abd42fb852451046bee9adc9 /moses/TranslationOption.cpp | |
parent | 88f888f5344b51161ab66afc53033eb8c665d3fd (diff) |
consistently set source phrase in translation options as soon as the trans opt is created
Diffstat (limited to 'moses/TranslationOption.cpp')
-rw-r--r-- | moses/TranslationOption.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/moses/TranslationOption.cpp b/moses/TranslationOption.cpp index 618102698..4bcd19094 100644 --- a/moses/TranslationOption.cpp +++ b/moses/TranslationOption.cpp @@ -83,6 +83,12 @@ const Phrase &TranslationOption::GetSourcePhrase() const return *m_sourcePhrase; } +void TranslationOption::SetSourcePhrase(const Phrase &sourcePhrase) +{ + CHECK(m_sourcePhrase == NULL); + m_sourcePhrase = &sourcePhrase; +} + TO_STRING_BODY(TranslationOption); |