summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lookup/test_phrase_lookup.cpp5
-rw-r--r--tests/lookup/test_pinyin_lookup.cpp7
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/lookup/test_phrase_lookup.cpp b/tests/lookup/test_phrase_lookup.cpp
index 36a070d..c7bfd19 100644
--- a/tests/lookup/test_phrase_lookup.cpp
+++ b/tests/lookup/test_phrase_lookup.cpp
@@ -80,8 +80,11 @@ int main(int argc, char * argv[]){
system_bigram.attach("../../data/bigram.db", ATTACH_READONLY);
Bigram user_bigram;
+ gfloat lambda = system_table_info.get_lambda();
+
/* init phrase lookup */
- PhraseLookup phrase_lookup(&phrase_table, &phrase_index,
+ PhraseLookup phrase_lookup(lambda,
+ &phrase_table, &phrase_index,
&system_bigram, &user_bigram);
/* try one sentence */
diff --git a/tests/lookup/test_pinyin_lookup.cpp b/tests/lookup/test_pinyin_lookup.cpp
index 446d8fd..3175db0 100644
--- a/tests/lookup/test_pinyin_lookup.cpp
+++ b/tests/lookup/test_pinyin_lookup.cpp
@@ -55,9 +55,12 @@ int main( int argc, char * argv[]){
system_bigram.attach("../../data/bigram.db", ATTACH_READONLY);
Bigram user_bigram;
user_bigram.attach(NULL, ATTACH_CREATE|ATTACH_READWRITE);
+
+ gfloat lambda = system_table_info.get_lambda();
- PinyinLookup2 pinyin_lookup(options, &largetable, &phrase_index,
- &system_bigram, &user_bigram);
+ PinyinLookup2 pinyin_lookup(lambda, options,
+ &largetable, &phrase_index,
+ &system_bigram, &user_bigram);
/* prepare the prefixes for get_best_match. */
TokenVector prefixes = g_array_new