pkuseg-python icon indicating copy to clipboard operation
pkuseg-python copied to clipboard

希望不要切分英文单词

Open TingxunShi opened this issue 6 years ago • 1 comments

import pkuseg
seg = pkuseg.pkuseg(model_name='news')
text = seg.cut('我特别喜欢Oda先生')
print(' '.join(text))
>>> '我 特别 喜欢 O da 先生'

TingxunShi avatar Dec 06 '19 04:12 TingxunShi

可以修改class Preprocess,在pkuseg/init.py 下,预处理时将英文提出来即可

ZhiyiLan avatar Dec 16 '19 07:12 ZhiyiLan