sugaroid package

Subpackages

Submodules

sugaroid.sugaroid module

class sugaroid.sugaroid.Sugaroid(readonly: bool = True, should_copy_db: bool = True, db_name: str = 'sugaroid.db')[source]

Bases: object

Sugaroid Initates the chatbot class and connects logic Adapters together. Initates the ConfigManager to store sugaroid data and connects scans sys.argv

append_author(author)[source]
corpus()[source]

Train data if it doesn’t exists. Periodically update the data too :return: True when the process is complete

disable_interrupt_ds()[source]
display_cli(response)[source]

Classic display adapter for TTY Sugaroid Command Line Interface :param response: :return:

init_local_trainers()[source]

Init local trainers with minimum conversation :return:

interrupt_ds()[source]
invoke_brain()[source]

Initiate the Brain :return:

list_train(li)[source]
loop_cli()[source]

Sugaroid loop_cli for Sugaroid Command Line Interface :return:

loop_gui()[source]

Launch the sugaroid PyQt5 gui with Breeze theme and custom features If PyQt5 not installed, raise ModuleNotFoundError :return:

parse(args)[source]

Do a simple parsing of the init statement. Classify statement on the type of input_statement and confidence of each statement :param args: :return:

prompt_cli()[source]

Classic prompt for Sugaroid Command Line Interface :return:

read()[source]

Train Sugaroid database from the sugaroid.trainer.json located in the configuration directory if it exists. If the sugaroid.db file exists, the Database update is skipped

Returns

set_internet_media_from_environment()[source]
toggle_discord()[source]
write()[source]
sugaroid.sugaroid.gui_main()[source]
sugaroid.sugaroid.main()[source]

Launch a cli / gui based on the sys.argv Entrypoint in setup.py console_entry_points :return:

sugaroid.train module

class sugaroid.train.SugaroidTrainer(path_to_local_database)[source]

Bases: object

sugaroid.version module

Module contents