alaajabari commited on
Commit
5490f51
·
verified ·
1 Parent(s): 9ecf198

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -5
main.py CHANGED
@@ -279,14 +279,15 @@ def entities_and_types(sentence):
279
  return entity_dict
280
  '''
281
  def entities_and_types(sentence):
282
- print("\n=== NER DEBUGGGGGGGGGG ===")
283
- print("INPUT:", sentence)
284
-
285
  ner_output = extract(sentence)
286
  print("RAW NER OUTPUT:", ner_output)
287
 
288
- entities = distill_entities(ner_output)
289
- print("DISTILLED ENTITIES:", entities)
 
 
 
 
290
 
291
  entity_dict = {}
292
  for name, entity_type, _, _ in entities:
 
279
  return entity_dict
280
  '''
281
  def entities_and_types(sentence):
 
 
 
282
  ner_output = extract(sentence)
283
  print("RAW NER OUTPUT:", ner_output)
284
 
285
+ try:
286
+ entities = distill_entities(ner_output)
287
+ print("DISTILLED ENTITIES:", entities)
288
+ except Exception as e:
289
+ print("❌ DISTILL ERROR:", str(e))
290
+ return {}
291
 
292
  entity_dict = {}
293
  for name, entity_type, _, _ in entities: