summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2018-01-29 15:00:42 +0800
committerPeng Wu <alexepico@gmail.com>2018-01-29 15:00:42 +0800
commitf4461b1f7687eba6ac95e8c995d0e3509adbb30d (patch)
tree67a97f9898f824d2139b1b1053882c6f35fe4280
parent813cedc202276fa6d4127446c4688d8a706c5ff5 (diff)
downloadlibpinyin-f4461b1f7687eba6ac95e8c995d0e3509adbb30d.zip
libpinyin-f4461b1f7687eba6ac95e8c995d0e3509adbb30d.tar.gz
libpinyin-f4461b1f7687eba6ac95e8c995d0e3509adbb30d.tar.xz
fixes compile
-rw-r--r--src/pinyin.cpp4
-rw-r--r--src/zhuyin.cpp4
-rw-r--r--tests/lookup/test_pinyin_lookup.cpp2
-rw-r--r--utils/training/eval_correction_rate.cpp6
4 files changed, 8 insertions, 8 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index b099d84..3933860 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -49,7 +49,7 @@ struct _pinyin_context_t{
Bigram * m_user_bigram;
/* lookups. */
- PhoneticLookup<3> * m_pinyin_lookup;
+ PhoneticLookup<3, 3> * m_pinyin_lookup;
PhraseLookup * m_phrase_lookup;
/* addon tables. */
@@ -367,7 +367,7 @@ pinyin_context_t * pinyin_init(const char * systemdir, const char * userdir){
gfloat lambda = context->m_system_table_info.get_lambda();
- context->m_pinyin_lookup = new PhoneticLookup<3>
+ context->m_pinyin_lookup = new PhoneticLookup<3, 3>
(lambda,
context->m_pinyin_table, context->m_phrase_index,
context->m_system_bigram, context->m_user_bigram);
diff --git a/src/zhuyin.cpp b/src/zhuyin.cpp
index 3b98df5..43745fa 100644
--- a/src/zhuyin.cpp
+++ b/src/zhuyin.cpp
@@ -47,7 +47,7 @@ struct _zhuyin_context_t{
Bigram * m_user_bigram;
/* lookups. */
- PhoneticLookup<1> * m_pinyin_lookup;
+ PhoneticLookup<1, 1> * m_pinyin_lookup;
PhraseLookup * m_phrase_lookup;
char * m_system_dir;
@@ -345,7 +345,7 @@ zhuyin_context_t * zhuyin_init(const char * systemdir, const char * userdir){
gfloat lambda = context->m_system_table_info.get_lambda();
- context->m_pinyin_lookup = new PhoneticLookup<1>
+ context->m_pinyin_lookup = new PhoneticLookup<1, 1>
( lambda,
context->m_pinyin_table, context->m_phrase_index,
context->m_system_bigram, context->m_user_bigram);
diff --git a/tests/lookup/test_pinyin_lookup.cpp b/tests/lookup/test_pinyin_lookup.cpp
index 6178b85..e3d6d1b 100644
--- a/tests/lookup/test_pinyin_lookup.cpp
+++ b/tests/lookup/test_pinyin_lookup.cpp
@@ -59,7 +59,7 @@ int main( int argc, char * argv[]){
gfloat lambda = system_table_info.get_lambda();
- PhoneticLookup<3> pinyin_lookup(lambda, &largetable, &phrase_index,
+ PhoneticLookup<3, 3> pinyin_lookup(lambda, &largetable, &phrase_index,
&system_bigram, &user_bigram);
/* prepare the prefixes for get_nbest_match. */
diff --git a/utils/training/eval_correction_rate.cpp b/utils/training/eval_correction_rate.cpp
index 5983cca..aa33e6b 100644
--- a/utils/training/eval_correction_rate.cpp
+++ b/utils/training/eval_correction_rate.cpp
@@ -61,7 +61,7 @@ bool get_possible_pinyin(FacadePhraseIndex * phrase_index,
}
bool get_best_match(FacadePhraseIndex * phrase_index,
- PhoneticLookup<1> * pinyin_lookup,
+ PhoneticLookup<1, 1> * pinyin_lookup,
PhoneticKeyMatrix * matrix,
NBestMatchResults * results) {
/* prepare the prefixes for get_nbest_match. */
@@ -79,7 +79,7 @@ bool get_best_match(FacadePhraseIndex * phrase_index,
return retval;
}
-bool do_one_test(PhoneticLookup<1> * pinyin_lookup,
+bool do_one_test(PhoneticLookup<1, 1> * pinyin_lookup,
FacadePhraseIndex * phrase_index,
TokenVector tokens){
bool retval = false;
@@ -156,7 +156,7 @@ int main(int argc, char * argv[]){
gfloat lambda = system_table_info.get_lambda();
- PhoneticLookup<1> pinyin_lookup(lambda,
+ PhoneticLookup<1, 1> pinyin_lookup(lambda,
&largetable, &phrase_index,
&system_bigram, &user_bigram);