summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorGuest_account Guest_account prguest11 <prguest11@taipan.cs>2011-09-23 15:44:35 +0100
committerGuest_account Guest_account prguest11 <prguest11@taipan.cs>2011-09-23 15:44:35 +0100
commit4dfd9d90a977e1b6cdc9c1a2ddd491dbd57981bb (patch)
treee09842ef2fe75a7fa44e40744cf679de96d9d610 /decoder
parent95e5ea6d1a884ac048567653b78f22f36222d38a (diff)
make show_partition work even in absence of feature functions
Diffstat (limited to 'decoder')
-rw-r--r--decoder/decoder.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/decoder/decoder.cc b/decoder/decoder.cc
index 45404c47..c4fe3c4d 100644
--- a/decoder/decoder.cc
+++ b/decoder/decoder.cc
@@ -794,6 +794,11 @@ bool DecoderImpl::Decode(const string& input, DecoderObserver* o) {
cerr << " Expected length (words): " << res.r / res.p << "\t" << res << endl;
}
+ if (conf.count("show_partition")) {
+ const prob_t z = Inside<prob_t, EdgeProb>(forest);
+ cerr << " Partition log(Z): " << log(z) << endl;
+ }
+
SummaryFeature summary_feature_type = kNODE_RISK;
if (conf["summary_feature_type"].as<string>() == "edge_risk")
summary_feature_type = kEDGE_RISK;