You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from pyltp import Segmentor
with Segmentor() as segmentor: # 初始化实例
segmentor.load(cws_model_path) # 加载模型
words = segmentor.segment('元芳你怎么看') # 分词
print('\t'.join(words))
The text was updated successfully, but these errors were encountered:
"Context managers allow you to allocate and release resources precisely when you want to. "
当前文档使用方法
可否支持
Context Manager
,可以节省释放模型的过程The text was updated successfully, but these errors were encountered: