AttributeError: module 'deepnlp.segmenter' has no attribute 'seg'
Closed this issue · 1 comments
xuf12 commented
用pip和source两种方法安装结果都是一样
from deepnlp import segmenter
text = "我爱吃北京烤鸭"
words = segmenter.seg(text)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-786664ee950e> in <module>()
1 text = "我爱吃北京烤鸭"
----> 2 words = segmenter.seg(text)
AttributeError: module 'deepnlp.segmenter' has no attribute 'seg'
Ubuntu 16.04
Anaconda4.4.0 - Python3.6
~/.pyenv/versions/anaconda3-4.4.0/lib/python3.6/site-packages/deepnlp
deepnlp.version: '0.1.7'
Silencezjl commented
from deepnlp import segmenter
tokenizer = segmenter.load_model(name = 'zh')
text = "我爱吃北京烤鸭"
words = tokenizer.seg(text)