diff options
Diffstat (limited to 'moses')
-rw-r--r-- | moses/FF/RuleScope.cpp | 14 | ||||
-rw-r--r-- | moses/FF/RuleScope.h | 1 |
2 files changed, 13 insertions, 2 deletions
diff --git a/moses/FF/RuleScope.cpp b/moses/FF/RuleScope.cpp index 5f38a59ae..3cfc19e7c 100644 --- a/moses/FF/RuleScope.cpp +++ b/moses/FF/RuleScope.cpp @@ -7,6 +7,7 @@ namespace Moses RuleScope::RuleScope(const std::string &line) :StatelessFeatureFunction(1, line) ,m_sourceSyntax(true) + ,m_futureCostOnly(false) { } @@ -45,14 +46,23 @@ void RuleScope::EvaluateInIsolation(const Phrase &source score += count; } - scoreBreakdown.PlusEquals(this, score); + if (m_futureCostOnly) { + estimatedFutureScore.PlusEquals(this, score); + } + else { + scoreBreakdown.PlusEquals(this, score); + } } void RuleScope::SetParameter(const std::string& key, const std::string& value) { if (key == "source-syntax") { m_sourceSyntax = Scan<bool>(value); - } else { + } + else if ("future-cost-only") { + m_futureCostOnly = Scan<bool>(value); + } + else { StatelessFeatureFunction::SetParameter(key, value); } } diff --git a/moses/FF/RuleScope.h b/moses/FF/RuleScope.h index 8bf7b7670..75148d0de 100644 --- a/moses/FF/RuleScope.h +++ b/moses/FF/RuleScope.h @@ -45,6 +45,7 @@ public: protected: bool m_sourceSyntax; + bool m_futureCostOnly; }; } |