From a5615f37bea556ee4995f368425b281ae86edbac Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sun, 12 Aug 2012 10:36:45 -0400 Subject: new interface --- gi/pf/hpyp_tm.cc | 2 +- gi/pf/learn_cfg.cc | 4 ++-- gi/pf/pyp_tm.cc | 2 +- gi/pf/pyp_word_model.h | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) (limited to 'gi/pf') diff --git a/gi/pf/hpyp_tm.cc b/gi/pf/hpyp_tm.cc index 784f9958..f362d3f8 100644 --- a/gi/pf/hpyp_tm.cc +++ b/gi/pf/hpyp_tm.cc @@ -31,7 +31,7 @@ struct ConditionalPYPWordModel { for (RuleModelHash::const_iterator it = r.begin(); it != r.end(); ++it) { cerr << TD::Convert(it->first) << " \tPYP(d=" << it->second.discount() << ",s=" << it->second.strength() << ") --------------------------" << endl; for (CCRP >::const_iterator i2 = it->second.begin(); i2 != it->second.end(); ++i2) - cerr << " " << i2->second.total_dish_count_ << '\t' << TD::GetString(i2->first) << endl; + cerr << " " << i2->second << endl; } } diff --git a/gi/pf/learn_cfg.cc b/gi/pf/learn_cfg.cc index 44eaa162..1d5126e4 100644 --- a/gi/pf/learn_cfg.cc +++ b/gi/pf/learn_cfg.cc @@ -160,7 +160,7 @@ struct HieroLMModel { p *= q; for (CCRP::const_iterator it = nts[i].begin(); it != nts[i].end(); ++it) { prob_t tp = p0(it->first); - tp.poweq(it->second.table_counts_.size()); + tp.poweq(it->second.num_tables()); p *= tp; } } @@ -169,7 +169,7 @@ struct HieroLMModel { p *= q; for (CCRP::const_iterator it = q0.begin(); it != q0.end(); ++it) { prob_t tp = base(it->first); - tp.poweq(it->second.table_counts_.size()); + tp.poweq(it->second.num_tables()); p *= tp; } } diff --git a/gi/pf/pyp_tm.cc b/gi/pf/pyp_tm.cc index 6bc8a5bf..37b9a604 100644 --- a/gi/pf/pyp_tm.cc +++ b/gi/pf/pyp_tm.cc @@ -31,7 +31,7 @@ struct ConditionalPYPWordModel { for (RuleModelHash::const_iterator it = r.begin(); it != r.end(); ++it) { cerr << TD::Convert(it->first) << " \tPYP(d=" << it->second.discount() << ",s=" << it->second.strength() << ") --------------------------" << endl; for (CCRP >::const_iterator i2 = it->second.begin(); i2 != it->second.end(); ++i2) - cerr << " " << i2->second.total_dish_count_ << '\t' << TD::GetString(i2->first) << endl; + cerr << " " << i2->second << '\t' << TD::GetString(i2->first) << endl; } } diff --git a/gi/pf/pyp_word_model.h b/gi/pf/pyp_word_model.h index 224a9034..0bebb751 100644 --- a/gi/pf/pyp_word_model.h +++ b/gi/pf/pyp_word_model.h @@ -47,8 +47,7 @@ struct PYPWordModel { std::cerr << "PYPWordModel: generations=" << r.num_customers() << " PYP(d=" << r.discount() << ",s=" << r.strength() << ')' << std::endl; for (typename CCRP >::const_iterator it = r.begin(); it != r.end(); ++it) { - std::cerr << " " << it->second.total_dish_count_ - << " (on " << it->second.table_counts_.size() << " tables) " + std::cerr << " " << it->second << TD::GetString(it->first) << std::endl; } } -- cgit v1.2.3