Normalize keyword extration result
Browse files- lightrag/operate.py +5 -1
lightrag/operate.py
CHANGED
@@ -218,7 +218,11 @@ async def _handle_single_relationship_extraction(
|
|
218 |
edge_description = clean_str(record_attributes[3])
|
219 |
edge_description = normalize_extracted_info(edge_description)
|
220 |
|
221 |
-
edge_keywords =
|
|
|
|
|
|
|
|
|
222 |
edge_source_id = chunk_key
|
223 |
weight = (
|
224 |
float(record_attributes[-1].strip('"').strip("'"))
|
|
|
218 |
edge_description = clean_str(record_attributes[3])
|
219 |
edge_description = normalize_extracted_info(edge_description)
|
220 |
|
221 |
+
edge_keywords = normalize_extracted_info(
|
222 |
+
clean_str(record_attributes[4]), is_entity=True
|
223 |
+
)
|
224 |
+
edge_keywords = edge_keywords.replace(",", ",")
|
225 |
+
|
226 |
edge_source_id = chunk_key
|
227 |
weight = (
|
228 |
float(record_attributes[-1].strip('"').strip("'"))
|