mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-09 00:12:21 +02:00
recognize natural broad current queries
This commit is contained in:
@@ -892,8 +892,15 @@ def broad_current_web_request(user_text):
|
||||
"""Whether the user requested a broad current-information briefing."""
|
||||
request = str(user_text or '')
|
||||
return bool(
|
||||
re.search(r'\b(?:latest|recent|current|today(?:\'s)?)\b', request, re.I)
|
||||
and re.search(r'\b(?:info(?:rmation)?|news|nees|updates?)\b', request, re.I)
|
||||
(
|
||||
re.search(r'\b(?:latest|recent|current|today(?:\'s)?)\b', request, re.I)
|
||||
and re.search(r'\b(?:info(?:rmation)?|news|nees|updates?)\b', request, re.I)
|
||||
)
|
||||
or re.search(
|
||||
r"\b(?:what(?:'s|\s+is)|anything|something)\s+new\b",
|
||||
request,
|
||||
re.I,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user