summaryrefslogtreecommitdiffstats
path: root/src/lookup/phrase_lookup.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2010-10-29 15:13:35 +0800
committerPeng Wu <alexepico@gmail.com>2010-10-29 15:13:35 +0800
commit5c7875b2ffb885aba4164d1f9b91362a939917a1 (patch)
treeeb0a35f67ea3fd6ee3a750421de503aab898c067 /src/lookup/phrase_lookup.cpp
parent97c9327e5dd9a3824be47a6d22749350280b1bf4 (diff)
downloadlibpinyin-5c7875b2ffb885aba4164d1f9b91362a939917a1.tar.gz
libpinyin-5c7875b2ffb885aba4164d1f9b91362a939917a1.tar.xz
libpinyin-5c7875b2ffb885aba4164d1f9b91362a939917a1.zip
fixes a typo
Diffstat (limited to 'src/lookup/phrase_lookup.cpp')
-rw-r--r--src/lookup/phrase_lookup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lookup/phrase_lookup.cpp b/src/lookup/phrase_lookup.cpp
index 97f8001..c7ddcf8 100644
--- a/src/lookup/phrase_lookup.cpp
+++ b/src/lookup/phrase_lookup.cpp
@@ -80,8 +80,8 @@ bool PhraseLookup::get_best_match(int sentence_length, utf16_t sentence[],
GHashTable * initial_step_index = (GHashTable *) g_ptr_array_index(m_steps_index, 0);
g_hash_table_insert(initial_step_index, GUINT_TO_POINTER(initial_key), GUINT_TO_POINTER(initial_step_content->len - 1));
- for ( int i = 0; i < nstep - 1; ++i) {
- for ( int m = i; m < nstep; ++m ){
+ for ( int i = 0; i < nstep - 1; ++i ){
+ for ( int m = i + 1; m < nstep; ++m ){
phrase_token_t next_token = null_token;
int result = m_phrase_table->search(m - i, sentence + i, next_token);
/* found next phrase */