Quellcode durchsuchen

Refactoring entity_resolution (#2692)

### What problem does this PR solve?

### Type of change

- [x] Refactoring
tags/v0.13.0
lidp vor 1 Jahr
Ursprung
Commit
d6db805885
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 1 neuen und 5 gelöschten Zeilen
  1. 1
    5
      graphrag/entity_resolution.py

+ 1
- 5
graphrag/entity_resolution.py Datei anzeigen

@@ -94,11 +94,7 @@ class EntityResolution:

candidate_resolution = {entity_type: [] for entity_type in entity_types}
for k, v in node_clusters.items():
candidate_resolution_tmp = []
for a, b in itertools.permutations(v, 2):
if self.is_similarity(a, b) and (b, a) not in candidate_resolution_tmp:
candidate_resolution_tmp.append((a, b))
candidate_resolution[k] = candidate_resolution_tmp
candidate_resolution[k] = [(a, b) for a, b in itertools.combinations(v, 2) if self.is_similarity(a, b)]

gen_conf = {"temperature": 0.5}
resolution_result = set()

Laden…
Abbrechen
Speichern