From 33ed15ef199a11c0690ff6db2bc2c8f446af3395 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 30 Sep 2014 14:22:38 +0100 Subject: move misc common functions into moses/ --- moses-cmd/Main.cpp | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'moses-cmd') diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp index 8328ddc78..5b3e61515 100644 --- a/moses-cmd/Main.cpp +++ b/moses-cmd/Main.cpp @@ -58,44 +58,6 @@ using namespace MosesCmd; namespace MosesCmd { -static void PrintFeatureWeight(const FeatureFunction* ff) -{ - cout << ff->GetScoreProducerDescription() << "="; - size_t numScoreComps = ff->GetNumScoreComponents(); - vector values = StaticData::Instance().GetAllWeights().GetScoresForProducer(ff); - for (size_t i = 0; i < numScoreComps; ++i) { - cout << " " << values[i]; - } - cout << endl; -} - -static void ShowWeights() -{ - //TODO: Find a way of ensuring this order is synced with the nbest - fix(cout,6); - const vector& slf = StatelessFeatureFunction::GetStatelessFeatureFunctions(); - const vector& sff = StatefulFeatureFunction::GetStatefulFeatureFunctions(); - - for (size_t i = 0; i < sff.size(); ++i) { - const StatefulFeatureFunction *ff = sff[i]; - if (ff->IsTuneable()) { - PrintFeatureWeight(ff); - } - else { - cout << ff->GetScoreProducerDescription() << " UNTUNEABLE" << endl; - } - } - for (size_t i = 0; i < slf.size(); ++i) { - const StatelessFeatureFunction *ff = slf[i]; - if (ff->IsTuneable()) { - PrintFeatureWeight(ff); - } - else { - cout << ff->GetScoreProducerDescription() << " UNTUNEABLE" << endl; - } - } -} - void OutputFeatureWeightsForHypergraph(std::ostream &outputSearchGraphStream) { outputSearchGraphStream.setf(std::ios::fixed); -- cgit v1.2.3