sotirios-slv commited on
Commit
1654918
1 Parent(s): 5e10a9a

Cleaned up entity string for display

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,12 +23,12 @@ def get_named_entities(ocr_text: str):
23
 
24
  for token in sentence:
25
  for entity in token.get_spans("ner"):
26
- print("ENT ", str(entity))
27
  entities.append(entity)
28
 
29
- print("ENTITIES ", entities)
30
- # entities = "/n".join(entities)
31
 
 
32
  return entities
33
 
34
 
 
23
 
24
  for token in sentence:
25
  for entity in token.get_spans("ner"):
26
+ entity = str(entity).split(":")[1]
27
  entities.append(entity)
28
 
29
+ entities = "/n".join(entities)
 
30
 
31
+ print("ENTITIES ", entities)
32
  return entities
33
 
34