diff options
author | Peng Wu <alexepico@gmail.com> | 2016-05-25 15:50:39 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-05-25 15:50:39 +0800 |
commit | 955b6ea0f53ce0f8708c08d113ea1c44478d685d (patch) | |
tree | 3030d2fe9c0fb7cb41ae72d278971cddaaf87374 /src/lookup/lookup.h | |
parent | e3b1c578005402c45cc27049fafe4c732f7e493c (diff) | |
download | libpinyin-955b6ea0f53ce0f8708c08d113ea1c44478d685d.tar.gz libpinyin-955b6ea0f53ce0f8708c08d113ea1c44478d685d.tar.xz libpinyin-955b6ea0f53ce0f8708c08d113ea1c44478d685d.zip |
update search_*gram method
Diffstat (limited to 'src/lookup/lookup.h')
-rw-r--r-- | src/lookup/lookup.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lookup/lookup.h b/src/lookup/lookup.h index bcc7006..902ed0d 100644 --- a/src/lookup/lookup.h +++ b/src/lookup/lookup.h @@ -37,13 +37,17 @@ typedef phrase_token_t lookup_key_t; struct lookup_value_t{ /* previous and current tokens of the node */ phrase_token_t m_handles[2]; + /* the sentence length */ + gint32 m_length; /* maximum possibility of current node */ gfloat m_poss; /* trace back information for final step */ gint32 m_last_step; lookup_value_t(gfloat poss = FLT_MAX){ - m_handles[0] = null_token; m_handles[1] = null_token; + m_handles[0] = null_token; + m_handles[1] = null_token; + m_length = 0; m_poss = poss; m_last_step = -1; } |