Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix synonym bug (#3506)

Kevin Hu17a7ea42eb92
diff --git a/rag/nlp/synonym.py b/rag/nlp/synonym.py
index 0c7721da6d..1a9a3f533f 100644
--- a/rag/nlp/synonym.py
+++ b/rag/nlp/synonym.py
@@ -68,7 +68,7 @@ class Dealer:
def lookup(self, tk):
if re.match(r"[a-z]+$", tk):
- res = list(set([re.sub("_", " ", syn.name().split(".")[0]) for syn in wordnet.synsets("love")]) - set([tk]))
+ res = list(set([re.sub("_", " ", syn.name().split(".")[0]) for syn in wordnet.synsets(tk)]) - set([tk]))
return [t for t in res if t]
self.lookup_num += 1