improve the speed

This commit is contained in:
fxsjy 2012-10-04 13:10:56 +08:00
parent 72a185b0ab
commit 164b782c4e

View File

@ -106,7 +106,7 @@ def __cut_DAG(sentence):
yield buf yield buf
buf=u'' buf=u''
else: else:
regognized = finalseg.cut(buf) regognized = finalseg.__cut(buf)
for t in regognized: for t in regognized:
yield t yield t
buf=u'' buf=u''
@ -117,7 +117,7 @@ def __cut_DAG(sentence):
if len(buf)==1: if len(buf)==1:
yield buf yield buf
else: else:
regognized = finalseg.cut(buf) regognized = finalseg.__cut(buf)
for t in regognized: for t in regognized:
yield t yield t