rosemariafontana commited on
Commit
afbb6c1
Β·
verified Β·
1 Parent(s): 9c9bc57

not adding as date if leftover

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- # 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}")
 
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}")