diff options
author | philblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-01 04:11:26 +0000 |
---|---|---|
committer | philblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-01 04:11:26 +0000 |
commit | 52c65e78485613b24d84a7d96f4d440c347c2028 (patch) | |
tree | 8872865244ab30662af7f3879a69d3833bc3aa1a /gi/pyp-topics/src/pyp-topics.hh | |
parent | 6ea9bd3aa600bce5224fa97dae79bee6f40699a2 (diff) |
Added hierarchical topics.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@87 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics/src/pyp-topics.hh')
-rw-r--r-- | gi/pyp-topics/src/pyp-topics.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gi/pyp-topics/src/pyp-topics.hh b/gi/pyp-topics/src/pyp-topics.hh index 47207d65..db0f7468 100644 --- a/gi/pyp-topics/src/pyp-topics.hh +++ b/gi/pyp-topics/src/pyp-topics.hh @@ -15,7 +15,9 @@ public: typedef double F; public: - PYPTopics(int num_topics) : m_num_topics(num_topics), m_word_pyps(1) {} + PYPTopics(int num_topics, bool use_topic_pyp=false) + : m_num_topics(num_topics), m_word_pyps(1), + m_topic_pyp(0.5,1.0), m_use_topic_pyp(use_topic_pyp) {} void sample(const Corpus& corpus, int samples); int sample(const DocumentId& doc, const Term& term); @@ -50,6 +52,8 @@ private: typedef std::vector< PYP<int> > PYPs; PYPs m_document_pyps; std::vector<PYPs> m_word_pyps; + PYP<int> m_topic_pyp; + bool m_use_topic_pyp; TermBackoffPtr m_backoff; }; |