如何使用gengensim中的潜在狄利克雷分配(LDA)来抽象两字主题而不是字母组合? [英] How to abstract bigram topics instead of unigrams using Latent Dirichlet Allocation (LDA) in python- gensim?
问题描述
-
单字
-
topic1-潜水,水,蒸气,潜水
topic1 -scuba,water,vapor,diving
主题2-二氧化物,植物,绿色,碳
topic2 -dioxide,plants,green,carbon
-
二元语法主题
Bi-gram topics
-
topic1-潜水,水蒸气
topic1 -scuba diving,water vapor
topic2-绿色植物,二氧化碳
topic2 -green plants,carbon dioxide
有什么主意吗?
推荐答案
您可以使用word2vec从使用LDA提取的前n个主题中获取最相似的术语.
You can use word2vec to get most similar terms from the top n topics abstracted using LDA.
LDA输出
使用抽象主题(例如:-san_francisco)创建二元语法字典
Create a dictionary of bi-grams using topics abstracted (for ex:-san_francisco)
然后,执行word2vec以获得最相似的词(单字,双字等)
Then, do word2vec to get most similar words (uni-grams,bi-grams etc)
单词和余弦距离
洛杉矶天使(0.666175)
golden_gate(0.571522)
奥克兰(0.557521)
los_angeles (0.666175)
golden_gate (0.571522)
oakland (0.557521)
检查 https://code.google.com/p/word2vec/(从词组以外的词
这篇关于如何使用gengensim中的潜在狄利克雷分配(LDA)来抽象两字主题而不是字母组合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!