diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2024-03-14 18:50:13 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2024-03-14 18:50:13 +0000 |
commit | 7576a456e436ef2f6ec615c7ad4a4bee8399c17b (patch) | |
tree | 9b03d4c79a30fa98ac91f464415f454ea49b024b /markov | |
parent | 4e1bda674d95b0fe3df028a9f429aa171ae63a68 (diff) | |
download | aps-cogs-7576a456e436ef2f6ec615c7ad4a4bee8399c17b.tar aps-cogs-7576a456e436ef2f6ec615c7ad4a4bee8399c17b.tar.gz aps-cogs-7576a456e436ef2f6ec615c7ad4a4bee8399c17b.zip |
markov: process semicolons
Diffstat (limited to 'markov')
-rw-r--r-- | markov/markov.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/markov/markov.py b/markov/markov.py index c7e980f..1819b12 100644 --- a/markov/markov.py +++ b/markov/markov.py @@ -92,7 +92,7 @@ class Markov(commands.Cog): + [ token for token in re.findall( - r"[\w']+|[\.,!?\/]|<:\w+:\d+>|<#\d+>|<@\d+>", content + r"[\w']+|[\.,!?\/;]|<:\w+:\d+>|<#\d+>|<@\d+>", content ) if len(token) <= MAX_TOKEN_LENGTH ] @@ -459,7 +459,7 @@ class Markov(commands.Cog): return next_token, frequency # NOTE: if changing PUNCTUATION, also change the regex in process_message() with the corresponding note - PUNCTUATION = ".,!?/" + PUNCTUATION = r".,!?/;" member_id = member.id if member else None result = "" token = "" |