From 77f51924d4660e0a7c295dc9af6b305118214ede Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 19 Oct 2010 14:48:33 +0800 Subject: begin to write phrase lookup header --- src/lookup/phrase_lookup.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/lookup/phrase_lookup.h') diff --git a/src/lookup/phrase_lookup.h b/src/lookup/phrase_lookup.h index 3565031..5473622 100644 --- a/src/lookup/phrase_lookup.h +++ b/src/lookup/phrase_lookup.h @@ -29,5 +29,28 @@ * @brief the definitions of phrase lookup related classes and structs. */ +class PhraseLookup{ +private: + +protected: + //saved varibles + novel::PhraseLargeTable * m_phrase_table; + novel::FacadePhraseIndex * m_phrase_index; + novel::Bigram * m_bigram; + + //internal step data structure + GPtrArray * m_steps_index; + /* Array of LookupStepIndex */ + GPtrArray * m_steps_content; + /* Array of LookupStepContent */ + + GArray * m_table_cache; + /* Array of phrase_token_t, for phrase lookup. */ + +public: + bool get_best_match(int sentence_length, utf16_t sentence[], MatchResults & results); + + bool convert_to_utf8(MatchResults results, /* out */ char * & result_string); +}; #endif -- cgit