可以从gensim lda模型中提取弓

is possible to extract bow from gensim lda model

我在我的预处理语料库上训练了 LDA 模型(我忘记保存以列表列表形式存在的预处理数据)是否可以从训练模型中恢复这些数据?

您可以使用 dictionary.id2token 来 return 来自 ID 的令牌。

以下代码可以工作:

词典[0]

bow=[(dictionary.id2token(item),count) for item,count in doc for doc in corpus]