赞
踩
python自然语言处理之加载本地语料库
from nltk.corpus import PlaintextCorpusReader # 语料库本地目录 coupus_root = "E:\\guoby\\temp\\dict" # 加载文件过滤 file_pattern = '.*' wodslist = PlaintextCorpusReader(coupus_root, file_pattern) print wodslist.fileids() print wodslist.words('tang300.txt')
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。