diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-10-28 14:18:06 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-10-28 14:18:06 +0300 |
commit | 9db9492294c7585504480148b924c6597104b207 (patch) | |
tree | 70c240569027b30398cbd57c72544ea4caa4ef6e /moses/ContextScope.h | |
parent | 6a2e6feeed434966ba72adc9f26d7b3496070b87 (diff) |
Bug fix related to where context weights live.
Diffstat (limited to 'moses/ContextScope.h')
-rw-r--r-- | moses/ContextScope.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/moses/ContextScope.h b/moses/ContextScope.h index 5a0d4feba..35f9f3166 100644 --- a/moses/ContextScope.h +++ b/moses/ContextScope.h @@ -142,6 +142,14 @@ public: return true; } + bool + SetContextWeights(SPTR<std::map<std::string,float> > const& w) { + if (m_context_weights) return false; + boost::unique_lock<boost::shared_mutex> lock(m_lock); + m_context_weights = w; + return true; + } + }; }; |