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+(?