mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-13 21:06:03 +08:00
fix synonym bug (#3506)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
2044bb0039
commit
17a7ea42eb
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user