ISSSTELEON 70cde6d
This commit is contained in:
+1
-3
@@ -1,4 +1,2 @@
|
||||
__pycache__/
|
||||
node_modules/
|
||||
dist/
|
||||
.angular/
|
||||
.pytest_cache/
|
||||
|
||||
+3
-1
@@ -413,6 +413,8 @@ def run_link(p: str, node: Link):
|
||||
known = [f for f in ("birth_date", "sex") if f in fields]
|
||||
orphan = set(whole.unique_id[whole[facts].isna().all(axis=1)]) if facts else set()
|
||||
undated = set(whole.unique_id[whole["birth_date"].isna()]) if "birth_date" in fields else set()
|
||||
whose = persons.set_index("unique_id")["cluster_id"].to_dict()
|
||||
answered = {frozenset((whose.get(r, r) for r in e)) for e in decided}
|
||||
lone = set()
|
||||
for f in ids:
|
||||
carried = persons.dropna(subset=[f]).groupby(["cluster_id", f]).size()
|
||||
@@ -421,7 +423,7 @@ def run_link(p: str, node: Link):
|
||||
def settle(r) -> tuple[str, str] | None:
|
||||
a, b = (r.unique_id_l, r.unique_id_r)
|
||||
sides = [(getattr(r, f"{f}_l"), getattr(r, f"{f}_r")) for f in known]
|
||||
if frozenset((a, b)) in decided or any(
|
||||
if frozenset((a, b)) in answered or any(
|
||||
(pd.notna(x) and pd.notna(y) and (x != y) for x, y in sides)
|
||||
):
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user