Calculate the topic sizes. Arguments: documents: Updated dataframe with documents and their corresponding IDs and newly added Topics
(self, documents: pd.DataFrame)
| 4453 | return c_tf_idf, words |
| 4454 | |
| 4455 | def _update_topic_size(self, documents: pd.DataFrame): |
| 4456 | """Calculate the topic sizes. |
| 4457 | |
| 4458 | Arguments: |
| 4459 | documents: Updated dataframe with documents and their corresponding IDs and newly added Topics |
| 4460 | """ |
| 4461 | self.topic_sizes_ = collections.Counter(documents.Topic.values.tolist()) |
| 4462 | self.topics_ = documents.Topic.astype(int).tolist() |
| 4463 | |
| 4464 | def _extract_words_per_topic( |
| 4465 | self, |
no outgoing calls