def extract_countries():
countries_vec = {}
vec = word2vec.Word2Vec.load("word2vec")
for line in open("../chapter09/countries.txt", "r"):
country = line.strip().replace(" ", "_")
if country in vec.vocab.keys():
countries_vec[country] = vec[country]
return countries_vec
评论列表
文章目录