mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
improve zh search with jieba
This commit is contained in:
parent
5194d1505c
commit
8c814ed2f3
@ -240,7 +240,7 @@ class SearchChinese(SearchLanguage):
|
|||||||
if JIEBA:
|
if JIEBA:
|
||||||
dict_path = options.get('dict')
|
dict_path = options.get('dict')
|
||||||
if dict_path and os.path.isfile(dict_path):
|
if dict_path and os.path.isfile(dict_path):
|
||||||
jieba.set_dictionary(dict_path)
|
jieba.load_userdict(dict_path)
|
||||||
|
|
||||||
self.stemmer = get_stemmer()
|
self.stemmer = get_stemmer()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user