From bdb29b0497f609f357e60a3a61b261485c76853f Mon Sep 17 00:00:00 2001 From: yangdx Date: Tue, 23 Sep 2025 23:16:17 +0800 Subject: [PATCH] Expand entity type synonyms for better graph node categorization --- lightrag_webui/src/hooks/useLightragGraph.tsx | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/lightrag_webui/src/hooks/useLightragGraph.tsx b/lightrag_webui/src/hooks/useLightragGraph.tsx index d67d4964..d55ac432 100644 --- a/lightrag_webui/src/hooks/useLightragGraph.tsx +++ b/lightrag_webui/src/hooks/useLightragGraph.tsx @@ -25,6 +25,8 @@ const TYPE_SYNONYMS: Record = { 'model': 'concept', 'project': 'concept', 'condition': 'concept', + 'rule': 'concept', + 'law': 'concept', '概念': 'concept', '对象': 'concept', '类别': 'concept', @@ -32,6 +34,8 @@ const TYPE_SYNONYMS: Record = { '模型': 'concept', '项目': 'concept', '条件': 'concept', + '规则': 'concept', + '法律': 'concept', 'method': 'method', 'process': 'method', @@ -39,33 +43,46 @@ const TYPE_SYNONYMS: Record = { '过程': 'method', 'artifact': 'artifact', - 'technology': 'technology', - 'tech': 'technology', + 'technology': 'artifact', + 'tech': 'artifact', + 'product': 'artifact', 'equipment': 'artifact', 'device': 'artifact', 'stuff': 'artifact', + 'component': 'artifact', + 'material': 'artifact', + 'chemical': 'artifact', 'weapon': 'artifact', 'arms': 'artifact', '人工制品': 'artifact', '人造物品': 'artifact', '技术': 'technology', '科技': 'technology', + '产品': 'artifact', '设备': 'artifact', '装备': 'artifact', '物品': 'artifact', + '材料': 'artifact', + '化学': 'artifact', '武器': 'artifact', '军火': 'artifact', 'naturalobject': 'naturalobject', 'natural': 'naturalobject', + 'phenomena': 'naturalobject', + 'substance': 'naturalobject', '自然对象': 'naturalobject', '自然物体': 'naturalobject', '自然现象': 'naturalobject', + '物质': 'naturalobject', '物体': 'naturalobject', - '现象': 'naturalobject', 'data': 'data', + 'figure': 'data', + 'value': 'data', '数据': 'data', + '数字': 'data', + '数值': 'data', 'content': 'content', 'book': 'content', @@ -91,8 +108,11 @@ const TYPE_SYNONYMS: Record = { 'person': 'person', 'people': 'person', 'human': 'person', + 'role': 'person', '人物': 'person', + '人类': 'person', '人': 'person', + '角色': 'person', 'creature': 'creature', 'animal': 'creature',