Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-08-08 18:03:01 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-08-08 18:03:01 +0400
commita60bbbf892c982c5a93549142166db0d654c7e11 (patch)
tree74d079d39207e108abd42fb852451046bee9adc9 /moses/TranslationOption.cpp
parent88f888f5344b51161ab66afc53033eb8c665d3fd (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.cpp6
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);