summaryrefslogtreecommitdiff
path: root/gi/pyp-topics/src/corpus.hh
diff options
context:
space:
mode:
authorbothameister <bothameister@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-28 14:16:49 +0000
committerbothameister <bothameister@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-28 14:16:49 +0000
commit088725c4708e83343154d1bed9dee18286446eaf (patch)
treef66981687b7279805314ff7cd683175a53ebe478 /gi/pyp-topics/src/corpus.hh
parent3e292f48ae09fef3ba31bd2e5082997b15385fcc (diff)
pyp-sampler: added randomization to sequence in which corpus is sampled
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@35 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics/src/corpus.hh')
-rw-r--r--gi/pyp-topics/src/corpus.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/gi/pyp-topics/src/corpus.hh b/gi/pyp-topics/src/corpus.hh
index 3dd17cf9..c1b0ceda 100644
--- a/gi/pyp-topics/src/corpus.hh
+++ b/gi/pyp-topics/src/corpus.hh
@@ -28,6 +28,8 @@ public:
const_iterator begin() const { return m_documents.begin(); }
const_iterator end() const { return m_documents.end(); }
+ const Document& at(size_t i) const { return m_documents.at(i); }
+
int num_documents() const { return m_documents.size(); }
int num_terms() const { return m_num_terms; }
int num_types() const { return m_num_types; }