don't seprate CRLF

This commit is contained in:
fxsjy 2013-06-22 21:56:39 +08:00
parent c015f4e297
commit a9f53e9c85
2 changed files with 13 additions and 8 deletions

View File

@ -221,7 +221,9 @@ def cut(sentence,cut_all=False):
else:
tmp = re_skip.split(blk)
for x in tmp:
if not cut_all:
if re_skip.match(x):
yield x
elif not cut_all:
for xx in x:
yield xx
else:

View File

@ -141,6 +141,9 @@ def __cut_internal(sentence):
else:
tmp = re_skip.split(blk)
for x in tmp:
if re_skip.match(x):
yield pair(x,'')
else:
for xx in x:
if re_num.match(xx):
yield pair(xx,'m')