Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -193,7 +193,7 @@ class BasicAgent:
|
|
193 |
entities = [e[0] for e in analysis['entities']]
|
194 |
pattern = r'(\b\d+\b)[^\.]*\b(' + '|'.join(re.escape(e) for e in entities) + r')\b'
|
195 |
matches = re.finditer(pattern, text, re.IGNORECASE)
|
196 |
-
counts = [int(match.group(1))
|
197 |
return max(counts) if counts else None
|
198 |
|
199 |
def _extract_date(self, text, analysis):
|
|
|
193 |
entities = [e[0] for e in analysis['entities']]
|
194 |
pattern = r'(\b\d+\b)[^\.]*\b(' + '|'.join(re.escape(e) for e in entities) + r')\b'
|
195 |
matches = re.finditer(pattern, text, re.IGNORECASE)
|
196 |
+
counts = [int(match.group(1)) for match in matches]
|
197 |
return max(counts) if counts else None
|
198 |
|
199 |
def _extract_date(self, text, analysis):
|