#ifndef _CONTEXTS_LEXER_H_ #define _CONTEXTS_LEXER_H_ #include #include #include #include "dict.h" struct ContextsLexer { typedef std::vector Context; struct PhraseContextsType { std::string phrase; std::vector contexts; std::vector< std::pair > counts; }; typedef void (*ContextsCallback)(const PhraseContextsType& new_contexts, void* extra); static void ReadContexts(std::istream* in, ContextsCallback func, void* extra); }; #endif