From 5278eb2cc06c41383d07311f59236494d09183a3 Mon Sep 17 00:00:00 2001 From: "philblunsom@gmail.com" Date: Thu, 1 Jul 2010 14:42:27 +0000 Subject: Added hierarchical topics. git-svn-id: https://ws10smt.googlecode.com/svn/trunk@88 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/pyp-topics/src/pyp-topics.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gi/pyp-topics/src/pyp-topics.cc b/gi/pyp-topics/src/pyp-topics.cc index 51511b3a..0f13cd35 100644 --- a/gi/pyp-topics/src/pyp-topics.cc +++ b/gi/pyp-topics/src/pyp-topics.cc @@ -165,10 +165,11 @@ void PYPTopics::sample(const Corpus& corpus, int samples) { int k=0; std::cerr << "Topics distribution: "; + std::cerr.precision(2); for (PYPs::iterator pypIt=m_word_pyps.front().begin(); pypIt != m_word_pyps.front().end(); ++pypIt, ++k) { std::cerr << "<" << k << ":" << pypIt->num_customers() << "," - << pypIt->num_types() << "," << m_topic_pyp.count(k) << "> "; + << pypIt->num_types() << "," << m_topic_pyp.prob(k, m_topic_p0) << "> "; if (k % 5 == 0) std::cerr << std::endl << '\t'; } std::cerr << std::endl; -- cgit v1.2.3