davda54 commited on
Commit
a0389a9
·
1 Parent(s): 00d0840

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -134,7 +134,7 @@ def render_table(forms, lemmas, upos, xpos, feats, named_entities):
134
  feats = list(zip(*feats))
135
 
136
  named_entities = [
137
- "" if ne == "O" else f"<< {ne.split('-')[1]} >>" if ne.startswith("B") else ne.split('-')[1] if ne.startswith("I") and i - 1 < len(named_entities) and named_entities[i + 1].startswith("I") else f"{ne.split('-')[1]} >>"
138
  for i, ne in enumerate(named_entities)
139
  ]
140
 
 
134
  feats = list(zip(*feats))
135
 
136
  named_entities = [
137
+ "" if ne == "O" else f"<< {ne.split('-')[1]} >>" if ne.startswith("B") else ne.split('-')[1] if (ne.startswith("I") and i + 1 < len(named_entities) and named_entities[i + 1].startswith("I")) else f"{ne.split('-')[1]} >>"
138
  for i, ne in enumerate(named_entities)
139
  ]
140