Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfd23c1

Browse files
committed
[seg] load dict
1 parent 4c97dfb commit dfd23c1

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ sftp-config.json
1010
dist/
1111
synonyms.egg-info
1212
.vscode/
13+
build/

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# 3.3
22
* 增加分词接口
3+
* 优化分词器初始化加载字典
34

45
# 3.2
56
* 将发布证书改为MIT

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name='synonyms',
16-
version='3.3.2',
16+
version='3.3.3',
1717
description='Chinese Synonyms for Natural Language Processing and Understanding',
1818
long_description=LONGDOC,
1919
author='Hai Liang Wang, Hu Ying Xi',

synonyms/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
else: print("warning: can not find dict at [%s]" % tokenizer_dict)
8383

8484
print(">> Synonyms load wordseg dict [%s] ... " % tokenizer_dict)
85-
jieba.set_dictionary(tokenizer_dict)
85+
_tokenizer.initialize(tokenizer_dict)
8686

8787
# stopwords
8888
_fin_stopwords_path = os.path.join(curdir, 'data', 'stopwords.txt')

0 commit comments

Comments
 (0)