Return topics with top n words and their c-TF-IDF score. Arguments: full: If True, returns all different forms of topic representations for each topic, including aspects Returns: self.topic_representations_: The top n words per topic and th
(self, full: bool = False)
| 1596 | self._create_topic_vectors() |
| 1597 | |
| 1598 | def get_topics(self, full: bool = False) -> Mapping[str, Tuple[str, float]]: |
| 1599 | """Return topics with top n words and their c-TF-IDF score. |
| 1600 | |
| 1601 | Arguments: |
| 1602 | full: If True, returns all different forms of topic representations |
| 1603 | for each topic, including aspects |
| 1604 | |
| 1605 | Returns: |
| 1606 | self.topic_representations_: The top n words per topic and the corresponding c-TF-IDF score |
| 1607 | |
| 1608 | Examples: |
| 1609 | ```python |
| 1610 | all_topics = topic_model.get_topics() |
| 1611 | ``` |
| 1612 | """ |
| 1613 | check_is_fitted(self) |
| 1614 | |
| 1615 | if full: |
| 1616 | topic_representations = {"Main": self.topic_representations_} |
| 1617 | topic_representations.update(self.topic_aspects_) |
| 1618 | return topic_representations |
| 1619 | else: |
| 1620 | return self.topic_representations_ |
| 1621 | |
| 1622 | def get_topic(self, topic: int, full: bool = False) -> Union[Mapping[str, Tuple[str, float]], bool]: |
| 1623 | """Return top n words for a specific topic and their c-TF-IDF scores. |