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 | 039fa032f3cd2c1bfdd32aa5048bd5e87a78e6f8 (patch) | |
tree | 96e2ab2526b87db21a0b8e9a6cb37badadee7a23 /gi/pyp-topics/src/pyp-topics.hh | |
parent | a7692212c60411c8017815460fe7b4c3847930ec (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; }; |