diff --git a/lightrag/operate.py b/lightrag/operate.py index 195343f3..087930eb 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -354,8 +354,8 @@ async def _handle_single_entity_extraction( ) return None - # Captitalize first letter of entity_type - entity_type = entity_type.title() + # Remove spaces and convert to lowercase + entity_type = entity_type.replace(" ", "").lower() # Process entity description with same cleaning pipeline entity_description = sanitize_and_normalize_extracted_text(record_attributes[3])