summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
authorphilblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-01 14:42:27 +0000
committerphilblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-01 14:42:27 +0000
commit8c08cbaaedd3e3c1609fbf1e7f01171f3c528afe (patch)
tree5ce96bdabf66de348917fa17329e1ab1d3af07c6 /gi
parent52c65e78485613b24d84a7d96f4d440c347c2028 (diff)
Added hierarchical topics.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@88 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi')
-rw-r--r--gi/pyp-topics/src/pyp-topics.cc3
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;