Update app.py
Browse files
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
|
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 |
|