What is TopicData and how is it used
mainThe TopicData object is the central abstraction in topicwizard. It encapsulates all information regarding topical inference within a corpus, allowing you to reproduce interpretive visualizations in both the web app and individual figures.
Because TopicData is implemented as a Python TypedDict, it behaves like a standard dictionary at runtime, making it highly interoperable with other Python libraries. However, it provides static type checking for developers using tools like Pyright.
You can pass a TopicData object to visualization utilities to recreate specific plots or launch the full web application interface.
import topicwizard
from topicwizard.figures import topic_map
# topic_map accepts a TopicData object
topic_map(topic_data)