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