diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-07-21 17:35:08 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-07-21 17:36:28 +0300 |
commit | 5aaa8fcbfae98765144d5914e083dacaace5ad60 (patch) | |
tree | 591705fd5469634cdd4cf3c4de7f7bc4aa9e05cd /moses/TranslationTask.h | |
parent | 506e02bdeca6dcc2a5eeba5cfda09619a31591ff (diff) |
1. Fixed concurrency issue in context handling.
2. Added phrase table feature function PScoreLengthRatio.
Diffstat (limited to 'moses/TranslationTask.h')
-rw-r--r-- | moses/TranslationTask.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/moses/TranslationTask.h b/moses/TranslationTask.h index 4cb817451..54733ac73 100644 --- a/moses/TranslationTask.h +++ b/moses/TranslationTask.h @@ -66,7 +66,7 @@ protected: // task is still live or not, or maintain a shared_ptr to ensure the // task stays alive till it's done with it. - std::string m_context_string; + boost::shared_ptr<std::vector<std::string> > m_context; std::map<std::string, float> m_context_weights; public: @@ -124,8 +124,11 @@ public: return m_scope; } - std::string const& GetContextString() const; - void SetContextString(std::string const& context); + boost::shared_ptr<std::vector<std::string> > + GetContextWindow() const; + + void + SetContextWindow(boost::shared_ptr<std::vector<std::string> > const& cw); std::map<std::string, float> const& GetContextWeights() const; void SetContextWeights(std::string const& context_weights); |