From 4dfd9d90a977e1b6cdc9c1a2ddd491dbd57981bb Mon Sep 17 00:00:00 2001 From: Guest_account Guest_account prguest11 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(forest); + cerr << " Partition log(Z): " << log(z) << endl; + } + SummaryFeature summary_feature_type = kNODE_RISK; if (conf["summary_feature_type"].as() == "edge_risk") summary_feature_type = kEDGE_RISK; -- cgit v1.2.3