diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-11-01 17:51:33 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-11-01 17:53:16 +0300 |
commit | e9b1c6019ba6ebce3bb4e090a1a6877b1c3d0e18 (patch) | |
tree | f6ee040be30c0bb5593cc01176bf32eff432c29d /moses/ScoreComponentCollection.cpp | |
parent | ff1977c29ecbca44f0420b4d22c7ebbc6335c197 (diff) |
Improved reporting of nbest scores via server interface.
Diffstat (limited to 'moses/ScoreComponentCollection.cpp')
-rw-r--r-- | moses/ScoreComponentCollection.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/moses/ScoreComponentCollection.cpp b/moses/ScoreComponentCollection.cpp index 1a9af8e57..e7a2acf9d 100644 --- a/moses/ScoreComponentCollection.cpp +++ b/moses/ScoreComponentCollection.cpp @@ -1,4 +1,4 @@ -// $Id$ +// -*- mode: c++; indent-tabs-mode: nil; tab-width:2 -*- #include <vector> #include <boost/algorithm/string/predicate.hpp> #include <boost/foreach.hpp> @@ -280,7 +280,9 @@ void ScoreComponentCollection::ZeroDenseFeatures(const FeatureFunction* sp) } //! get subset of scores that belong to a certain sparse ScoreProducer -FVector ScoreComponentCollection::GetVectorForProducer(const FeatureFunction* sp) const +FVector +ScoreComponentCollection:: +GetVectorForProducer(const FeatureFunction* sp) const { FVector fv(s_denseVectorSize); std::string prefix = sp->GetScoreProducerDescription() + FName::SEP; @@ -310,14 +312,16 @@ ScoreComponentCollection:: OutputAllFeatureScores(std::ostream &out, bool with_labels) const { std::string lastName = ""; - const vector<const StatefulFeatureFunction*>& sff = StatefulFeatureFunction::GetStatefulFeatureFunctions(); + const vector<const StatefulFeatureFunction*>& sff + = StatefulFeatureFunction::GetStatefulFeatureFunctions(); for( size_t i=0; i<sff.size(); i++ ) { const StatefulFeatureFunction *ff = sff[i]; if (ff->IsTuneable()) { OutputFeatureScores(out, ff, lastName, with_labels); } } - const vector<const StatelessFeatureFunction*>& slf = StatelessFeatureFunction::GetStatelessFeatureFunctions(); + const vector<const StatelessFeatureFunction*>& slf + = StatelessFeatureFunction::GetStatelessFeatureFunctions(); for( size_t i=0; i<slf.size(); i++ ) { const StatelessFeatureFunction *ff = slf[i]; if (ff->IsTuneable()) { |