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
path: root/mira
diff options
context:
space:
mode:
authorEva Hasler <evahasler@gmail.com>2012-03-30 01:01:17 +0400
committerEva Hasler <evahasler@gmail.com>2012-03-30 01:01:17 +0400
commit0a537a9f58b27d43098095531820db0c7a6c0a2a (patch)
treecae09c0c1ed1b589173bc757ac47824f6b96417e /mira
parent03d3cb6a7a4b2bbe29a898a32578266d50368a36 (diff)
print feature counts to file
Diffstat (limited to 'mira')
-rw-r--r--mira/Main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/mira/Main.cpp b/mira/Main.cpp
index 447dab2ec..3c869a102 100644
--- a/mira/Main.cpp
+++ b/mira/Main.cpp
@@ -606,8 +606,10 @@ int main(int argc, char** argv) {
string f1 = "decode_hope_epoch0";
string f2 = "decode_fear_epoch0";
+ string s1 = "sparse_feature_hope_counts";
ofstream hopePlusFeatures(f1.c_str());
ofstream fearPlusFeatures(f2.c_str());
+ ofstream sparseFeatureCounts(s1.c_str());
if (!hopePlusFeatures || !fearPlusFeatures) {
ostringstream msg;
msg << "Unable to open file";
@@ -1362,7 +1364,8 @@ int main(int argc, char** argv) {
if (weightEpochDump == weightDumpFrequency && printFeatureInfo) {
// print out all features with counts
- mixedAverageWeights.PrintSparseFeatureCounts();
+ mixedAverageWeights.PrintSparseFeatureCounts(sparseFeatureCounts);
+ sparseFeatureCounts.close();
}
}
}