diff --git a/bot.py b/bot.py index e2f8ca8..7c394e1 100644 --- a/bot.py +++ b/bot.py @@ -21,7 +21,7 @@ from modules.central import ping_server from modules.translations import * from modules.markovmemory import * from modules.version import * -from modules.messages import * +from modules.sentenceprocessing import * print(splashtext) # you can use https://patorjk.com/software/taag/ for 3d text or just remove this entirely check_for_update() @@ -200,17 +200,6 @@ async def talk(ctx, sentence_size: int = 5): else: await send_message(ctx, f"{get_translation(LOCALE, 'command_talk_generation_fail')}") -def improve_sentence_coherence(sentence): - - sentence = sentence.replace(" i ", " I ") - return sentence - -def rephrase_for_coherence(sentence): - - words = sentence.split() - - coherent_sentence = " ".join(words) - return coherent_sentence bot.help_command = None diff --git a/modules/globalvars.py b/modules/globalvars.py index 5da6da6..b29e43a 100644 --- a/modules/globalvars.py +++ b/modules/globalvars.py @@ -40,5 +40,5 @@ song = os.getenv("song") arch = platform.machine() slash_commands_enabled = False latest_version = "0.0.0" -local_version = "0.15.1" +local_version = "0.15.2" os.environ['gooberlocal_version'] = local_version \ No newline at end of file diff --git a/modules/messages.py b/modules/sentenceprocessing.py similarity index 89% rename from modules/messages.py rename to modules/sentenceprocessing.py index cf53e98..6e8d8ca 100644 --- a/modules/messages.py +++ b/modules/sentenceprocessing.py @@ -54,3 +54,15 @@ def preprocess_message(message): tokens = word_tokenize(message) tokens = [token for token in tokens if token.isalnum()] return " ".join(tokens) + +def improve_sentence_coherence(sentence): + + sentence = sentence.replace(" i ", " I ") + return sentence + +def rephrase_for_coherence(sentence): + + words = sentence.split() + + coherent_sentence = " ".join(words) + return coherent_sentence \ No newline at end of file