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:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-10-28 14:18:06 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-10-28 14:18:06 +0300
commit9db9492294c7585504480148b924c6597104b207 (patch)
tree70c240569027b30398cbd57c72544ea4caa4ef6e /moses/ContextScope.h
parent6a2e6feeed434966ba72adc9f26d7b3496070b87 (diff)
Bug fix related to where context weights live.
Diffstat (limited to 'moses/ContextScope.h')
-rw-r--r--moses/ContextScope.h8
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;
+ }
+
};
};