Skip to content

Commit

Permalink
fix the error about imoprting ChineseAnalyzer
Browse files Browse the repository at this point in the history
Because of the interface change about ChineseAnlayzer , the code 'from jieba.analyse import Chinese Analyzer' in this test file would report an ImportError like 'cannot import name 'ChineseAnalyzer'. Just change import code to 'from jieba.analyse.analyzer import ChineseAnalyzer' can fix it.
  • Loading branch information
ZhengZixiang authored Sep 15, 2018
1 parent 7653db2 commit ca444fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_whoosh.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 6,7 @@
from whoosh.fields import *
from whoosh.qparser import QueryParser

from jieba.analyse import ChineseAnalyzer
from jieba.analyse.analyzer import ChineseAnalyzer

analyzer = ChineseAnalyzer()

Expand Down

0 comments on commit ca444fb

Please sign in to comment.