Get a string representation of the current object. Returns: str: Human readable representation of the most important model parameters. The parameters that represent models are ignored due to their length.
(self)
| 4868 | return parameters |
| 4869 | |
| 4870 | def __str__(self): |
| 4871 | """Get a string representation of the current object. |
| 4872 | |
| 4873 | Returns: |
| 4874 | str: Human readable representation of the most important model parameters. |
| 4875 | The parameters that represent models are ignored due to their length. |
| 4876 | """ |
| 4877 | parameters = "" |
| 4878 | for parameter, value in self.get_params().items(): |
| 4879 | value = str(value) |
| 4880 | if "(" in value and value[0] != "(": |
| 4881 | value = value.split("(")[0] + "(...)" |
| 4882 | parameters += f"{parameter}={value}, " |
| 4883 | |
| 4884 | return f"BERTopic({parameters[:-2]})" |
| 4885 | |
| 4886 | |
| 4887 | class TopicMapper: |
nothing calls this directly
no test coverage detected