summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dyer <prguest11@taipan.cs>2012-02-27 02:40:00 +0000
committerChris Dyer <prguest11@taipan.cs>2012-02-27 02:40:00 +0000
commitd4c89a181635b8ca1286bcc8887dfb368000cc6f (patch)
tree947a5073faad954fceba5a3df51f75d32f66a99a
parentd87220030b82fed860efee40487502e9ee8f0651 (diff)
fix base distribution, partially
-rw-r--r--gi/pf/learn_cfg.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gi/pf/learn_cfg.cc b/gi/pf/learn_cfg.cc
index 3d202816..6e574035 100644
--- a/gi/pf/learn_cfg.cc
+++ b/gi/pf/learn_cfg.cc
@@ -106,10 +106,10 @@ struct BaseRuleModel {
const prob_t nonterm_prob(1.0 - term_prob.as_float());
for (unsigned i = 0; i < r.f_.size(); ++i) {
if (r.f_[i] <= 0) { // nonterminal
- p *= nonterm_prob;
+ if (kALLOW_MIXED) p *= nonterm_prob;
p *= unif_nonterm;
} else { // terminal
- p *= term_prob;
+ if (kALLOW_MIXED) p *= term_prob;
p *= unif_term;
}
}