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:
authorHieu Hoang <hieuhoang@gmail.com>2013-05-16 22:05:08 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-05-16 22:05:08 +0400
commitf04ec4c56df99946e5d9602aa0045fa544fbbe9a (patch)
treeb363265f07d8246cd9658687e332ef7ec05979d7 /moses-cmd
parentb322e78a3876bac33f3b24945b5d8822d45920c2 (diff)
1. remove all code for MetaFeature from mira.
2. in ShowWeights(), all print out dense feature weights. Don't print 'sparse' for sparse feature functions. All features functions can contains dense and sparse
Diffstat (limited to 'moses-cmd')
-rw-r--r--moses-cmd/Main.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp
index 8c5c18a9c..3a6f2856e 100644
--- a/moses-cmd/Main.cpp
+++ b/moses-cmd/Main.cpp
@@ -446,21 +446,13 @@ private:
static void PrintFeatureWeight(const FeatureFunction* ff)
{
+ cout << ff->GetScoreProducerDescription() << "=";
size_t numScoreComps = ff->GetNumScoreComponents();
- if (numScoreComps != 0) {
- vector<float> values = StaticData::Instance().GetAllWeights().GetScoresForProducer(ff);
- cout << ff->GetScoreProducerDescription() << "=";
- for (size_t i = 0; i < numScoreComps; ++i) {
- cout << " " << values[i];
- }
- cout << endl;
- }
- else {
- if (ff->GetSparseProducerWeight() == 1)
- cout << ff->GetScoreProducerDescription() << "= sparse" << endl;
- else
- cout << ff->GetScoreProducerDescription() << "= " << ff->GetSparseProducerWeight() << endl;
+ vector<float> values = StaticData::Instance().GetAllWeights().GetScoresForProducer(ff);
+ for (size_t i = 0; i < numScoreComps; ++i) {
+ cout << " " << values[i];
}
+ cout << endl;
}
static void ShowWeights()