summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lookup/pinyin_lookup.h5
-rw-r--r--src/pinyin.cpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lookup/pinyin_lookup.h b/src/lookup/pinyin_lookup.h
index 3211acf..ec30957 100644
--- a/src/lookup/pinyin_lookup.h
+++ b/src/lookup/pinyin_lookup.h
@@ -128,6 +128,11 @@ public:
~PinyinLookup();
+ bool set_options(pinyin_option_t options) {
+ m_options = options;
+ return true;
+ }
+
bool get_best_match(ChewingKeyVector keys, CandidateConstraints constraints, MatchResults & results);
bool train_result(ChewingKeyVector keys, CandidateConstraints constraints, MatchResults & results);
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 87f61fc..8467570 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -261,6 +261,7 @@ bool pinyin_set_options(pinyin_context_t * context,
pinyin_option_t options){
context->m_options = options;
context->m_pinyin_table->set_options(context->m_options);
+ context->m_pinyin_lookup->set_options(context->m_options);
return true;
}