From e1b61419329c83709018ca397a29d069e4294bd1 Mon Sep 17 00:00:00 2001
From: Guest_account Guest_account prguest11 <prguest11@taipan.cs>
Date: Fri, 23 Sep 2011 15:44:35 +0100
Subject: make show_partition work even in absence of feature functions

---
 decoder/decoder.cc | 5 +++++
 1 file changed, 5 insertions(+)

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;
-- 
cgit v1.2.3