infineac.topic_extractor.categorize_topics#
- infineac.topic_extractor.categorize_topics(keywords_topics: list[list[str]]) DataFrame[source]#
Categorizes a lists of keywords (keywords_topics) according to the
infineac.constants.TOPICS()dictionary, that maps keywords to categories.Categories are grouped topics. Each list in keywords_topics corresponds to a topic, that is a list of keywords. Each list in keywords_topics is mapped to a category, that is a list of as well keywords.
- Parameters:
keywords_topics (list[list[str]]) – List of lists of keywords per topic.
- Returns:
DataFrame containing the categories and keywords per topic.
- Return type:
pl.DataFrame