diff options
author | Peng Wu <alexepico@gmail.com> | 2010-08-18 14:58:57 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2010-08-18 14:58:57 +0800 |
commit | 6f3ee371d7118ac04327a7654a519657e8981edd (patch) | |
tree | b1de5338007b83f3babf9805831ff3f0aff56724 /src/storage/phrase_index.h | |
parent | 6f8c022c759f7930449596bdad0bcc9b23cdcb41 (diff) | |
download | libpinyin-6f3ee371d7118ac04327a7654a519657e8981edd.tar.gz libpinyin-6f3ee371d7118ac04327a7654a519657e8981edd.tar.xz libpinyin-6f3ee371d7118ac04327a7654a519657e8981edd.zip |
add get_range to phrase index
Diffstat (limited to 'src/storage/phrase_index.h')
-rwxr-xr-x | src/storage/phrase_index.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/storage/phrase_index.h b/src/storage/phrase_index.h index 0b532b1..3f94bd3 100755 --- a/src/storage/phrase_index.h +++ b/src/storage/phrase_index.h @@ -161,10 +161,14 @@ public: } } + /* binary memory chunk load/store method */ bool load(MemoryChunk * chunk, table_offset_t offset, table_offset_t end); bool store(MemoryChunk * new_chunk, table_offset_t offset, table_offset_t & end); + + /* get token range in this sub phrase */ + int get_range(/* out */ PhraseIndexRange & range); /* Zero-gram */ guint32 get_phrase_index_total_freq(); @@ -206,6 +210,9 @@ public: bool store(guint8 phrase_index, MemoryChunk * new_chunk); bool unload(guint8 phrase_index); + /* get each sub phrase token range with phrase_index added */ + int get_range(guint8 phrase_index, /* out */ PhraseIndexRange & range); + /* Zero-gram */ guint32 get_phrase_index_total_freq(){ return m_total_freq; |