def load_dict_corpus_all_review():
'''
return the gensim dict&corpus on the whole review corpus
:return: dict&corpus
'''
if not (os.path.isfile(DICT_PATH) and os.path.isfile(CORPUS_PATH)):
generate_dict_corpus_all_review()
print('Reading dict & corpus')
dict = corpora.Dictionary.load(DICT_PATH)
corpus = corpora.MmCorpus(CORPUS_PATH)
print('Reading complicated')
return corpus, dict
评论列表
文章目录