diff options
author | Eva Hasler <evahasler@gmail.com> | 2011-12-13 23:13:13 +0400 |
---|---|---|
committer | Eva Hasler <evahasler@gmail.com> | 2011-12-13 23:13:13 +0400 |
commit | 85ce6547fdf132330798c5c5684db19e0fe7dd42 (patch) | |
tree | 33c44bc43eb5aca9c848087d04bb55059d59934b /moses-cmd | |
parent | 76d7595667dec913ecbf2a7c2572e95a22eaaf1b (diff) |
-show-weights: output sparseProducerWeight if != 1, otherwise 'sparse'
Diffstat (limited to 'moses-cmd')
-rw-r--r-- | moses-cmd/src/Main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/moses-cmd/src/Main.cpp b/moses-cmd/src/Main.cpp index 846f27b7f..ea132b08b 100644 --- a/moses-cmd/src/Main.cpp +++ b/moses-cmd/src/Main.cpp @@ -297,8 +297,12 @@ static void PrintFeatureWeight(const FeatureFunction* ff) << values[i] << endl; } } else { - cout << ff->GetScoreProducerDescription() << " " << - ff->GetScoreProducerWeightShortName() << " sparse" << endl; + if (ff->GetSparseProducerWeight() == 1) + cout << ff->GetScoreProducerDescription() << " " << + ff->GetScoreProducerWeightShortName() << " sparse" << endl; + else + cout << ff->GetScoreProducerDescription() << " " << + ff->GetScoreProducerWeightShortName() << " " << ff->GetSparseProducerWeight() << endl; } } |