txlyre 1 month ago
parent
commit
0637b36bd6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      markov.py

+ 1 - 1
markov.py

@@ -50,7 +50,7 @@ class Markov:
 
           return
 
-        text = re.sub(r"(@[a-z0-9_]+,?)", "", text)
+        text = re.sub(r"(@[A-Za-z0-9_]+,?)", "", text)
         text = re.sub("https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_\\+.~#?&\\/=]*)", "", text)
         text = re.sub(r"((\!\?\?)|(\!\?)|(\?\!\!)|(\?\?\!)|(\?\!)|(\?\.\.)|(\.{2,})|(\!{2,})|(\?{2,})|[.?!,:;\(\)\"'\$\+\-–—…])", r" \1 ", text)
         text = text.split(" ")