From 351c1e5262cb465ef6236db58bc536b0317e5325 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 2 Nov 2021 10:39:51 +0100 Subject: [PATCH] Adding a video --- main.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 97ea282..24f4dc1 100644 --- a/main.py +++ b/main.py @@ -35,7 +35,7 @@ def load(variables) -> dict: return keys def cleanTweet(tweet: str) -> str: - """Remove all unwanted elements from the tweet.""" + """Remove all unwanted elements from the tweet.""" tweet = tweet.lower() # convert to lower case tweet = sub(r"(https?:\/\/\S+|www.\S+)", " ", tweet) # remove URLs hashtagMatch = findall(r"#\S+", tweet) # check all hashtags @@ -47,7 +47,7 @@ def cleanTweet(tweet: str) -> str: tweet = sub(r" *?[^\w\s]+", " ", tweet) # remove everything who is not a letter or a number or a space tweet = sub(r"\S+(?=si|ci)", " ", tweet) # remove element of the word only if the last syllable can be matched (so more words will be answered without adding them manually) tweet = sub(r"(?<=ui)i+|(?<=na)a+(?