diff options
author | philblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-05 20:51:20 +0000 |
---|---|---|
committer | philblunsom <philblunsom@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-05 20:51:20 +0000 |
commit | a8f7835ebae718bfaf717289efc998754ba6117b (patch) | |
tree | 1174120053355fdd019b1667e72568044adb448e /gi/pyp-topics/src/contexts_corpus.hh | |
parent | c26c81e305cb733d74db20189a1f3a7afd2fc306 (diff) |
Updated config file handling for pyp-topics and pipeline.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@141 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics/src/contexts_corpus.hh')
-rw-r--r-- | gi/pyp-topics/src/contexts_corpus.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gi/pyp-topics/src/contexts_corpus.hh b/gi/pyp-topics/src/contexts_corpus.hh index 891e3a6b..66b71783 100644 --- a/gi/pyp-topics/src/contexts_corpus.hh +++ b/gi/pyp-topics/src/contexts_corpus.hh @@ -4,6 +4,7 @@ #include <vector> #include <string> #include <map> +#include <tr1/unordered_map> #include <boost/ptr_container/ptr_vector.hpp> @@ -66,6 +67,11 @@ public: return res; } + virtual int context_count(const WordID& id) const { + return m_context_counts.find(id)->second; + } + + const std::string& key(const int& i) const { return m_keys.at(i); } @@ -74,6 +80,7 @@ private: TermBackoffPtr m_backoff; Dict m_dict; std::vector<std::string> m_keys; + std::tr1::unordered_map<int,int> m_context_counts; }; #endif // _CONTEXTS_CORPUS_HH |