diff options
author | Peng Wu <alexepico@gmail.com> | 2017-02-06 13:26:01 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2017-02-06 13:31:04 +0800 |
commit | 0327c836a2ba39656fb1ec7f7e342a93aac665bb (patch) | |
tree | 0396eed67512516903bfd22d6f9bc60d95183617 /src/lookup/phonetic_lookup.h | |
parent | 1e698604f33ece6cbd3ee436aa6b9607003f3150 (diff) | |
download | libpinyin-0327c836a2ba39656fb1ec7f7e342a93aac665bb.tar.gz libpinyin-0327c836a2ba39656fb1ec7f7e342a93aac665bb.tar.xz libpinyin-0327c836a2ba39656fb1ec7f7e342a93aac665bb.zip |
update PhoneticLookup
Diffstat (limited to 'src/lookup/phonetic_lookup.h')
-rw-r--r-- | src/lookup/phonetic_lookup.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lookup/phonetic_lookup.h b/src/lookup/phonetic_lookup.h index 9a147ed..1108198 100644 --- a/src/lookup/phonetic_lookup.h +++ b/src/lookup/phonetic_lookup.h @@ -27,6 +27,7 @@ #include <math.h> #include "phonetic_key_matrix.h" #include "ngram.h" +#include "lookup.h" namespace pinyin{ @@ -131,11 +132,6 @@ struct trellis_constraint_t { } }; -typedef phrase_token_t lookup_key_t; -/* Key: lookup_key_t, Value: int m, index to m_steps_content[i][m] */ -typedef GHashTable * LookupStepIndex; -/* Array of trellis_node */ -typedef GArray * LookupStepContent; /* use maximum heap to get the topest results. */ template<gint32 nbest> @@ -921,6 +917,14 @@ public: return true; } + + bool convert_to_utf8(MatchResult result, + /* out */ char * & result_string) + { + return pinyin::convert_to_utf8(m_phrase_index, result, + NULL, false, result_string); + } + }; }; |