Skip to content

Instantly share code, notes, and snippets.

@CyrilRJK
Created June 7, 2022 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CyrilRJK/78f7e6f1a7a3259277ec1401d9dfdd9d to your computer and use it in GitHub Desktop.
Save CyrilRJK/78f7e6f1a7a3259277ec1401d9dfdd9d to your computer and use it in GitHub Desktop.
def get_artm_topics(model_artm):
"""Return string representations of artm topics"""
topics = []
for topic_name in model_artm.topic_names:
topics.append(model_artm.score_tracker['TopTokensScore'].last_tokens[topic_name])
return topics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment