【发布时间】:2017-02-24 13:17:00
【问题描述】:
我的磁盘上有 9GB 的分段文档,而我的 vps 只有 4GB 内存。
如何在初始化时不加载所有语料库的情况下对所有数据集进行矢量化?有没有示例代码?
我的代码如下:
contents = [open('./seg_corpus/' + filename).read()
for filename in filenames]
vectorizer = CountVectorizer(stop_words=stop_words)
vectorizer.fit(contents)
【问题讨论】:
标签: python numpy machine-learning scikit-learn