mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
commit
c2f4b04722
@ -190,7 +190,7 @@ def __cut_DAG(sentence):
|
|||||||
for t in regognized:
|
for t in regognized:
|
||||||
yield t
|
yield t
|
||||||
def cut(sentence,cut_all=False):
|
def cut(sentence,cut_all=False):
|
||||||
if not ( type(sentence) is unicode):
|
if not isinstance(sentence, unicode):
|
||||||
try:
|
try:
|
||||||
sentence = sentence.decode('utf-8')
|
sentence = sentence.decode('utf-8')
|
||||||
except:
|
except:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user