tommy.controller.language_controller

Classes

class tommy.controller.language_controller.LanguageController[source]

Bases: object

Controls the access to and changes to the selected language for topic modelling, and loading the settings from the associated file.

property change_language_event: EventHandler[SupportedLanguage]

The event that is triggered when the language is changed :return: The event

get_language() SupportedLanguage[source]

Return the language for the topic modelling

property language_model_changed_event: EventHandler[None]

The event that is triggered when the language model is changed for example due to changing configs :return: The event

on_model_swap() None[source]

Notify the frontend that the language model has changed :return: None

set_language(language: SupportedLanguage) None[source]

Set the language of the corpus and notify the preprocessing pipeline and stopwords that the language has changed :param language: The new language :return: None

set_model_refs(language_model: LanguageModel) None[source]

Set the reference to the language-model :param language_model: The language model :return: None