File size: 379 Bytes
cf4ac41
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import re
URL_PATTERN = re.compile(r"http[s]?://\S+")
REPEATED_PUNCTUATION_PATTERN = re.compile(r"([!?]{2,})")
REPEATED_CHARACTER_PATTERN = re.compile(r"(.)\1{2,}")
WHITESPACE_PATTERN = re.compile(r"\s+")
ONE_WORD_MESSAGES = ["ok", "k", "sure", "fine", "cool", "done", "lol", "lmao"]
DRY_RESPONSES = ["?", "??", "...", "."]
PUNCTUATION_REMOVAL_PATTERN = re.compile(r'[^\w\s\d]')