diff options
Diffstat (limited to 'gi/pyp-topics/src/contexts_corpus.hh')
-rw-r--r-- | gi/pyp-topics/src/contexts_corpus.hh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gi/pyp-topics/src/contexts_corpus.hh b/gi/pyp-topics/src/contexts_corpus.hh index bd0cd34c..9614e7e3 100644 --- a/gi/pyp-topics/src/contexts_corpus.hh +++ b/gi/pyp-topics/src/contexts_corpus.hh @@ -49,9 +49,6 @@ class ContextsCorpus : public Corpus { friend void read_callback(const ContextsLexer::PhraseContextsType&, void*); public: - typedef boost::ptr_vector<Document>::const_iterator const_iterator; - -public: ContextsCorpus() : m_backoff(new TermBackoff) {} virtual ~ContextsCorpus() {} @@ -62,9 +59,18 @@ public: return m_backoff; } + std::vector<std::string> context2string(const WordID& id) const { + return m_dict.AsVector(id); + } + + const std::string& key(const int& i) const { + return m_keys.at(i); + } + private: TermBackoffPtr m_backoff; Dict m_dict; + std::vector<std::string> m_keys; }; #endif // _CONTEXTS_CORPUS_HH |