python word2vec()训练中文语句,显示错误如下,求大神指教: 10
UserWarning:detectedWindows;aliasingchunkizetochunkize_serialwarnings.warn("detectedW...
UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
我导入前有加
import warnings
warnings.filterwarnings(action='ignore', category=UserWarning, module='gensim')
import gensim
这几行代码的。
CHINESE_CORPUS =[['鲜花', '美金', '玫瑰', '钱'], ['鲜花', '百合', '人民币', '钱'], ['鲜花', '水仙', '英镑', '钱']]
def fun():
line_corpus = []
for line in CHINESE_CORPUS:
line_list = line.split(' ')
line_corpus.append(line_list)
print str(line_corpus).decode('string_escape')
tokenized_corpus = gensim.models.Word2Vec(line_corpus,min_count=1)
print tokenized_corpus #此处打印不出且报错上述的信息 展开
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
我导入前有加
import warnings
warnings.filterwarnings(action='ignore', category=UserWarning, module='gensim')
import gensim
这几行代码的。
CHINESE_CORPUS =[['鲜花', '美金', '玫瑰', '钱'], ['鲜花', '百合', '人民币', '钱'], ['鲜花', '水仙', '英镑', '钱']]
def fun():
line_corpus = []
for line in CHINESE_CORPUS:
line_list = line.split(' ')
line_corpus.append(line_list)
print str(line_corpus).decode('string_escape')
tokenized_corpus = gensim.models.Word2Vec(line_corpus,min_count=1)
print tokenized_corpus #此处打印不出且报错上述的信息 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询