v1.8.1: fix consent flow — split-based word matching, refuse words before quick_intent, operator handler, plain text phones, clarify_intent post-processing
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import re
|
||||
|
||||
words = ["да", "даю", "согласен", "согласна", "yes", "ok", "хорошо", "даю согласие"]
|
||||
|
||||
texts = [
|
||||
"не хочу давать согласие",
|
||||
"я даю согласие",
|
||||
"да",
|
||||
"нет",
|
||||
"передумал, даю согласие",
|
||||
"согласен",
|
||||
"хорошо",
|
||||
]
|
||||
|
||||
for text in texts:
|
||||
matches = []
|
||||
for w in words:
|
||||
if re.search(r'\b' + re.escape(w) + r'\b', text):
|
||||
matches.append(w)
|
||||
print(f"'{text}' -> matched: {matches}")
|
||||
Reference in New Issue
Block a user