Spaces:
Runtime error
Runtime error
not adding as date if leftover
Browse files
app.py
CHANGED
|
@@ -56,11 +56,11 @@ def extract_features(tokens, labels):
|
|
| 56 |
print(f"Debug -- Potentially starting a new date: {token}")
|
| 57 |
else:
|
| 58 |
# If no patterns are detected and there is any accumulated data
|
| 59 |
-
if current_date:
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
|
| 65 |
# Append token as non-date
|
| 66 |
print(f"Debug -- Appending non-date Token: {token}")
|
|
|
|
| 56 |
print(f"Debug -- Potentially starting a new date: {token}")
|
| 57 |
else:
|
| 58 |
# If no patterns are detected and there is any accumulated data
|
| 59 |
+
#if current_date:
|
| 60 |
+
# # Finalize accumulated partial date
|
| 61 |
+
# print(f"Debug -- Date finalized: {current_date}")
|
| 62 |
+
# merged_entities.append((current_date, 'date'))
|
| 63 |
+
# current_date = "" # Reset for next entity
|
| 64 |
|
| 65 |
# Append token as non-date
|
| 66 |
print(f"Debug -- Appending non-date Token: {token}")
|