Commit
·
bf5f745
1
Parent(s):
69a7750
lets see how the hihgt works
Browse files
app.py
CHANGED
|
@@ -67,8 +67,13 @@ def extract_entities(sentence):
|
|
| 67 |
entity["start"] : entity["end"]
|
| 68 |
].strip() # Ensure we're working with the correct portion of the text
|
| 69 |
entity["surface"] = entity_text
|
| 70 |
-
label = f"{entity['type']}
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
entity["entity"] = label
|
| 73 |
# print(f"Entity text: {entity}")
|
| 74 |
|
|
|
|
| 67 |
entity["start"] : entity["end"]
|
| 68 |
].strip() # Ensure we're working with the correct portion of the text
|
| 69 |
entity["surface"] = entity_text
|
| 70 |
+
label = f"{entity['type']}"
|
| 71 |
+
if "title" in entity:
|
| 72 |
+
label += f" - Title: {entity['title']}"
|
| 73 |
+
if "name" in entity:
|
| 74 |
+
label += f" - Name: {entity['name']}"
|
| 75 |
+
if "function" in entity:
|
| 76 |
+
label += f" - Function: {entity['function']}"
|
| 77 |
entity["entity"] = label
|
| 78 |
# print(f"Entity text: {entity}")
|
| 79 |
|