We will create topics from a set of words.
Install the required modules:
Python code:
Run the Python script:
Output:
Topics are represented by the main keywords in the text.
Their names are composed of these keywords concatenated with the underscore character ("_").
A specific topic with the tag "-1" can be listed and should include all keywords that do not match a specific topic.
This topic may also include outliers which are candidates that do not match any of the found topics.
Chart of the topics (Topic Word Scores): bertopic-barchart-figure.html