Open alonjacovi opened 3 years ago
@alonjacovi Sorry for the late reply. Oh, I accidentally forgot to answer it. You can get topic assignment of each word in a trained or an inferred document. (https://bab2min.github.io/tomotopy/v0.11.0/en/#tomotopy.Document.topics)
Get the document first, and access topics
property to get topic assignment.
mdl = LDAModel(...) # create the model
# add_docs ...
mdl.train(...) # train the model
doc = mdl.docs[0] # get the document
print(doc.topics) # topic assignment for each word in doc
I'd like to infer topic assignments from a trained LDA model on a document, rather than the probability distribution over all topics. How can I accomplish this?
Thanks