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:
authorNicola Bertoldi <bertoldi@fbk.eu>2014-12-13 14:52:47 +0300
committerNicola Bertoldi <bertoldi@fbk.eu>2014-12-13 14:52:47 +0300
commite4eb201c52be74fee74399a6f35fcbe8eb85d834 (patch)
tree7792ef96d63262f6e28f1857741e1162c7dccbc4 /moses/FF/FeatureFunction.cpp
parentcea2d9d8bb34a81660974cae20d66aefec4e0468 (diff)
parenta0b6b6a341e74b47bbef4652ad7fd928cf91e17c (diff)
merged master into dynamic-models and solved conflicts
Diffstat (limited to 'moses/FF/FeatureFunction.cpp')
-rw-r--r--moses/FF/FeatureFunction.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/moses/FF/FeatureFunction.cpp b/moses/FF/FeatureFunction.cpp
index 90d198680..22eacd271 100644
--- a/moses/FF/FeatureFunction.cpp
+++ b/moses/FF/FeatureFunction.cpp
@@ -34,9 +34,18 @@ void FeatureFunction::Destroy()
RemoveAllInColl(s_staticColl);
}
+void FeatureFunction::CallChangeSource(InputType *&input)
+{
+ for (size_t i = 0; i < s_staticColl.size(); ++i) {
+ const FeatureFunction &ff = *s_staticColl[i];
+ ff.ChangeSource(input);
+ }
+}
+
FeatureFunction::
FeatureFunction(const std::string& line)
: m_tuneable(true)
+ , m_verbosity(std::numeric_limits<std::size_t>::max())
, m_numScoreComponents(1)
{
Initialize(line);
@@ -46,6 +55,7 @@ FeatureFunction::
FeatureFunction(size_t numScoreComponents,
const std::string& line)
: m_tuneable(true)
+ , m_verbosity(std::numeric_limits<std::size_t>::max())
, m_numScoreComponents(numScoreComponents)
{
Initialize(line);
@@ -107,6 +117,8 @@ void FeatureFunction::SetParameter(const std::string& key, const std::string& va
{
if (key == "tuneable") {
m_tuneable = Scan<bool>(value);
+ } else if (key == "verbosity") {
+ m_verbosity = Scan<size_t>(value);
} else if (key == "filterable") { //ignore
} else {
UTIL_THROW(util::Exception, "Unknown argument " << key << "=" << value);