Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEva Hasler <evahasler@gmail.com>2011-12-13 23:13:13 +0400
committerEva Hasler <evahasler@gmail.com>2011-12-13 23:13:13 +0400
commit85ce6547fdf132330798c5c5684db19e0fe7dd42 (patch)
tree33c44bc43eb5aca9c848087d04bb55059d59934b /moses-cmd
parent76d7595667dec913ecbf2a7c2572e95a22eaaf1b (diff)
-show-weights: output sparseProducerWeight if != 1, otherwise 'sparse'
Diffstat (limited to 'moses-cmd')
-rw-r--r--moses-cmd/src/Main.cpp8
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;
}
}