mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Perf: limit embedding in KG. (#8917)
### What problem does this PR solve? ### Type of change - [x] Performance Improvement
This commit is contained in:
@ -237,7 +237,10 @@ class EntityResolution(Extractor):
|
||||
return True
|
||||
return False
|
||||
|
||||
if len(set(a) & set(b)) > 1:
|
||||
return True
|
||||
a, b = set(a), set(b)
|
||||
max_l = max(len(a), len(b))
|
||||
if max_l < 4:
|
||||
return len(a & b) > 1
|
||||
|
||||
return len(a & b)*1./max_l >= 0.8
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user