diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-08-12 10:36:45 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-08-12 10:36:45 -0400 |
commit | a5615f37bea556ee4995f368425b281ae86edbac (patch) | |
tree | c1eafd5d10020959ecf971eac97bdc06d25f8eaf /gi | |
parent | 465abfdb07652238291e807f709292a9ff066366 (diff) |
new interface
Diffstat (limited to 'gi')
-rw-r--r-- | gi/pf/hpyp_tm.cc | 2 | ||||
-rw-r--r-- | gi/pf/learn_cfg.cc | 4 | ||||
-rw-r--r-- | gi/pf/pyp_tm.cc | 2 | ||||
-rw-r--r-- | gi/pf/pyp_word_model.h | 3 |
4 files changed, 5 insertions, 6 deletions
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<vector<WordID> >::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<TRule>::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<TRule>::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<vector<WordID> >::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<std::vector<WordID> >::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; } } |