summaryrefslogtreecommitdiff
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
commite1b61419329c83709018ca397a29d069e4294bd1 (patch)
tree679dbb13ecc2d85b6fe0ab4e2ee4efb9a7891046
parente2d78e3fc1cb414d9d68af4cb4ee397b0c1f8dcc (diff)
make show_partition work even in absence of feature functions
-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;