[英]how to store the dictionary in genism which has been created for the specific dataset?
如何在genism中存儲字典?
這是為使用Mac OS對LDA.i執行的特定數據集創建的。
這是我當前的代碼:
dictionary=corpora.Dictionary(texts)
dictionary.save(Macintosh_HD.Users.srinivasan(bin,'creation.dict'))
通過提供確切的保存位置,可以輕松完成此操作。
dictionary = corpora.Dictionary(texts)
dictionary.save('/Users/Srinivasan/bin/creation.dict')
檢查字典:
print(dictionary)
print(dictionary.token2id)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.