summaryrefslogtreecommitdiff
path: root/gi
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
commitc9fecc7613c075dc2e998479a9d39a538807e609 (patch)
tree1ec5e027a8389e45b89a9d2c41b045b3498e9ac4 /gi
parentdc2b2fc395ad496851f723c4da59181445c07047 (diff)
fix base distribution, partially
Diffstat (limited to 'gi')
-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;
}
}