The method `get_document_topics` in the `gensim.models.ldamodel.LdaModel` class is used to extract the topic distribution for a given document based on the trained LDA model. This method takes a document as input and returns a list of tuples, where each tuple consists of a topic index and the corresponding probability score. The probability score represents the strength of the association between the document and the topic. This function can be useful in tasks such as topic modeling, text classification, and document similarity analysis, as it allows users to understand the different topics present in a given document.
Python LdaModel.get_document_topics - 31 examples found. These are the top rated real world Python examples of gensim.models.ldamodel.LdaModel.get_document_topics extracted from open source projects. You can rate examples to help us improve the quality of examples.