2

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?

Stephen Rauch
  • 1,831
  • 11
  • 23
  • 34
user3778289
  • 129
  • 1
  • 4

1 Answers1

0

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'))