summaryrefslogtreecommitdiffstats
path: root/src/lookup/pinyin_lookup2.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-04-11 11:04:25 +0800
committerPeng Wu <alexepico@gmail.com>2013-04-11 11:04:25 +0800
commit669090ae1dfca2fa3ac1cbd1612648891b53353f (patch)
tree1793fac49f2377a32dc79b1e4ed75f414689322e /src/lookup/pinyin_lookup2.h
parentb72087c4ed9a3d36f6136b74ab848138a0974043 (diff)
downloadlibpinyin-669090ae1dfca2fa3ac1cbd1612648891b53353f.tar.gz
libpinyin-669090ae1dfca2fa3ac1cbd1612648891b53353f.tar.xz
libpinyin-669090ae1dfca2fa3ac1cbd1612648891b53353f.zip
update PinyinLookup2
Diffstat (limited to 'src/lookup/pinyin_lookup2.h')
-rw-r--r--src/lookup/pinyin_lookup2.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lookup/pinyin_lookup2.h b/src/lookup/pinyin_lookup2.h
index 1509d65..dbe15c9 100644
--- a/src/lookup/pinyin_lookup2.h
+++ b/src/lookup/pinyin_lookup2.h
@@ -80,8 +80,8 @@ struct lookup_constraint_t{
*/
class PinyinLookup2{
private:
- static const gfloat bigram_lambda;
- static const gfloat unigram_lambda;
+ const gfloat bigram_lambda;
+ const gfloat unigram_lambda;
PhraseItem m_cache_phrase_item;
SingleGram m_merged_single_gram;
@@ -119,6 +119,7 @@ protected:
public:
/**
* PinyinLookup2::PinyinLookup2:
+ * @lambda: the lambda parameter for interpolation model.
* @options: the pinyin options.
* @pinyin_table: the pinyin table.
* @phrase_index: the phrase index.
@@ -128,8 +129,11 @@ public:
* The constructor of the PinyinLookup2.
*
*/
- PinyinLookup2(pinyin_option_t options, FacadeChewingTable * pinyin_table,
- FacadePhraseIndex * phrase_index, Bigram * system_bigram,
+ PinyinLookup2(const gfloat lambda,
+ pinyin_option_t options,
+ FacadeChewingTable * pinyin_table,
+ FacadePhraseIndex * phrase_index,
+ Bigram * system_bigram,
Bigram * user_bigram);
/**