diff --git a/moses-chart-cmd/src/Main.cpp b/moses-chart-cmd/src/Main.cpp index 03974595b..c5829cd86 100644 --- a/moses-chart-cmd/src/Main.cpp +++ b/moses-chart-cmd/src/Main.cpp @@ -40,6 +40,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include "Main.h" +#include "DummyScoreProducers.h" #include "FactorCollection.h" #include "Manager.h" #include "Phrase.h" @@ -196,16 +197,47 @@ static void ShowWeights() cout.precision(6); const StaticData& staticData = StaticData::Instance(); const TranslationSystem& system = staticData.GetTranslationSystem(TranslationSystem::DEFAULT); - const vector& slf =system.GetStatelessFeatureFunctions(); - const vector& sff = system.GetStatefulFeatureFunctions(); - for (size_t i = 0; i < sff.size(); ++i) { - PrintFeatureWeight(sff[i]); + //This has to match the order in the nbest list + + //LMs + const LMList& lml = system.GetLanguageModels(); + LMList::const_iterator lmi = lml.begin(); + for (; lmi != lml.end(); ++lmi) { + PrintFeatureWeight(*lmi); } - for (size_t i = 0; i < slf.size(); ++i) { - if (slf[i]->GetScoreProducerWeightShortName() != "u") { - PrintFeatureWeight(slf[i]); + + //sparse stateful ffs + const vector& sff = system.GetStatefulFeatureFunctions(); + for( size_t i=0; iGetNumScoreComponents() == ScoreProducer::unlimited) { + PrintFeatureWeight(sff[i]); } } + + // translation components - phrase dicts + const vector& pds = system.GetPhraseDictionaries(); + for( size_t i=0; i& gds = system.GetGenerationDictionaries(); + for( size_t i=0; i& slf = system.GetStatelessFeatureFunctions(); + for( size_t i=0; iGetNumScoreComponents() == ScoreProducer::unlimited) { + PrintFeatureWeight(slf[i]); + } + } + + }