Merge pull request #1 from fxsjy/master

使用更明确的表达
This commit is contained in:
项超 2013-05-10 02:24:27 -07:00
commit c691a23084

View File

@ -190,7 +190,7 @@ def __cut_DAG(sentence):
for t in regognized:
yield t
def cut(sentence,cut_all=False):
if not ( type(sentence) is unicode):
if not isinstance(sentence, unicode):
try:
sentence = sentence.decode('utf-8')
except: