diff options
author | philblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-06-28 15:01:17 +0000 |
---|---|---|
committer | philblunsom@gmail.com <philblunsom@gmail.com@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-06-28 15:01:17 +0000 |
commit | 1d089b02eff4fa8837faecf99021f624d8845e5d (patch) | |
tree | b6e3d20094514749c37485e154117871cdc8696f /gi/pyp-topics/src/contexts_lexer.h | |
parent | 088725c4708e83343154d1bed9dee18286446eaf (diff) |
Added contexts_corpus for reading text data files.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@36 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'gi/pyp-topics/src/contexts_lexer.h')
-rw-r--r-- | gi/pyp-topics/src/contexts_lexer.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gi/pyp-topics/src/contexts_lexer.h b/gi/pyp-topics/src/contexts_lexer.h new file mode 100644 index 00000000..f9a1b21c --- /dev/null +++ b/gi/pyp-topics/src/contexts_lexer.h @@ -0,0 +1,22 @@ +#ifndef _CONTEXTS_LEXER_H_ +#define _CONTEXTS_LEXER_H_ + +#include <iostream> +#include <vector> +#include <string> + +#include "../../../decoder/dict.h" + +struct ContextsLexer { + typedef std::vector<std::string> Context; + struct PhraseContextsType { + std::string phrase; + std::vector<Context> contexts; + std::vector<int> counts; + }; + + typedef void (*ContextsCallback)(const PhraseContextsType& new_contexts, void* extra); + static void ReadContexts(std::istream* in, ContextsCallback func, void* extra); +}; + +#endif |