Spaces:
Build error
Build error
Commit
·
f4946a4
1
Parent(s):
e3f78a5
Update app.py
Browse files
app.py
CHANGED
@@ -220,8 +220,11 @@ if st.button("Analyze"):
|
|
220 |
if len(ents[idxx]["word"].split())==2:
|
221 |
ner_result.append({ents[idxx]["entity_group"]:ents[idxx]["word"]})
|
222 |
else:
|
223 |
-
|
224 |
-
|
|
|
|
|
|
|
225 |
idxx=idxx+1
|
226 |
idx=idx+1
|
227 |
profits=[x["profit"] for x in ner_result if "profit" in x]
|
|
|
220 |
if len(ents[idxx]["word"].split())==2:
|
221 |
ner_result.append({ents[idxx]["entity_group"]:ents[idxx]["word"]})
|
222 |
else:
|
223 |
+
try:
|
224 |
+
ner_result.append({ents[idxx]["entity_group"]:ents[idxx]["word"]+ents[idxx+1]["word"]+ents[idxx+2]["word"]})
|
225 |
+
idxx=idxx+2
|
226 |
+
except:
|
227 |
+
pass
|
228 |
idxx=idxx+1
|
229 |
idx=idx+1
|
230 |
profits=[x["profit"] for x in ner_result if "profit" in x]
|