2
$\begingroup$

This question already has an answer here:

I want to give labels to different topics created using LDA. I don't want to do it manually. I saw some papers on automatic labeling but I am still confused.

How can I use the information produced by LDA to automatically generate names to the topics generated?

$\endgroup$

marked as duplicate by Sean Owen Dec 22 '18 at 2:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0
$\begingroup$

I suppose it is late to answer, but it may turn out to be helpful for others.

LDA presents all topics as a mixture of keywords with their weights For example, in gensim implementation it looks like this:

topic #0: 0.009*river + 0.008*lake + 0.006*island + 0.005*mountain + 0.004*area + 0.004*park + 0.004*antarctic + 0.004*south + 0.004*mountains + 0.004*dam

So you may name a topic using the keywords with the largest weights (like River+Lake). Or you may use something like WordNet to find the most common hypernym for them. For example, in python you can do it like this.

from nltk.corpus import wordnet as wn
wn.synset('river.n.01').lowest_common_hypernyms(wn.synset('lake.n.01'))
$\endgroup$
  • $\begingroup$ i am not working with English so the option of wordnet is not suitable in my case. $\endgroup$ – user3778289 Aug 28 '18 at 18:05
  • $\begingroup$ There are wordnets for other languages, search for Multilingual wordnet with your favorite search engine. $\endgroup$ – jknappen Dec 21 '18 at 18:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.