tokenize punctuation before recording words
This commit is contained in:
parent
dccdda1f5f
commit
4d20f602a7
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ async def rec(self, m):
|
||||||
beg = shared.db["beg"]
|
beg = shared.db["beg"]
|
||||||
end = shared.db["end"]
|
end = shared.db["end"]
|
||||||
|
|
||||||
words = m.split()
|
words = re.sub(r"([\.,\?!])", r" \1", m).split()
|
||||||
|
|
||||||
if words[0] == "admin" or len(words) < 2:
|
if words[0] == "admin" or len(words) < 2:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue