diff options
author | philblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-01 14:42:27 +0000 |
---|---|---|
committer | philblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-01 14:42:27 +0000 |
commit | 5278eb2cc06c41383d07311f59236494d09183a3 (patch) | |
tree | 7eed7fe29f28214fc3141a0a49e7fa4723aa6bdd /gi/pyp-topics/src | |
parent | 039fa032f3cd2c1bfdd32aa5048bd5e87a78e6f8 (diff) |
Added hierarchical topics.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@88 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics/src')
-rw-r--r-- | gi/pyp-topics/src/pyp-topics.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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; |