ignore white space

pull/39/head
Sun Junyi 12 years ago
parent 45591bb9ab
commit 012fddf13f

@ -169,7 +169,7 @@ def cut(sentence,cut_all=False):
tmp = re_skip.split(blk)
for x in tmp:
if re_skip.match(x):
if x!=' ':
if x.strip(' ')!='':
yield x
else:
for xx in x:

@ -136,7 +136,8 @@ def cut(sentence):
tmp = re_skip.split(blk)
for x in tmp:
if re_skip.match(x):
yield pair(x,'')
if x.strip(' ')!='':
yield pair(x,'')
else:
for xx in x:
if re_num.match(xx):

Loading…
Cancel
Save