mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-26 04:51:09 -05:00
Jeopardy: question regex tweak
This commit is contained in:
parent
efb40612ff
commit
27b9642b29
@ -271,7 +271,7 @@ class Jeopardy(callbacks.Plugin):
|
|||||||
|
|
||||||
def normalize(self, q):
|
def normalize(self, q):
|
||||||
q = re.sub('<[^<]+?>', '', fix_text(q, normalization='NFKC')).replace(r"\'", "'").replace(r'\"', '"')
|
q = re.sub('<[^<]+?>', '', fix_text(q, normalization='NFKC')).replace(r"\'", "'").replace(r'\"', '"')
|
||||||
q = re.sub('([,;:.!?)])([a-zA-Z]|\"|\'|\()(?![.\'])', '\g<1> \g<2>', q)
|
q = re.sub('([,;:.!?)])([a-zA-Z]|\()(?![.\'])', '\g<1> \g<2>', q)
|
||||||
q = " ".join(q.split())
|
q = " ".join(q.split())
|
||||||
return q
|
return q
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user