LightRAG
LightRAG copied to clipboard
Confusion about the double quotation marks (" or ") in the entity name
Hi, Thank you for this good work!
However, I am confused about the double quotation marks (" or ") in the entity name.
As the code in this function, all extracted attributes are enclosed in quotation marks. I think we need to remove quotation marks since we fail to remove the whitespace before or after the entity name.
For example, If we get an attribute '"ROMAN EMPIRE "', we cannot remove the whitespace in this attribute with clean_str() function. As a result, we will get the following node, whose id has an unwanted whitespace.
<node id=""ROMAN EMPIRE "">
<data key="d0">"ORGANIZATION"</data>
<data key="d1">"xxx"</data>
<data key="d2">chunk-xxx</data>
</node>
In some cases, it would result in some duplicated nodes, like ""ROMAN EMPIRE "" and ""ROMAN EMPIRE"" Is this feature a bug?