mirror of
https://github.com/PR0M3TH3AN/unredact.git
synced 2026-11-04 12:40:29 +00:00
feat: generate associates.json with tiered Epstein network data
Fix source_name/target_name field mapping in tier computation, use compact JSON output (696KB). Stats: 7147 lookups, 1614 persons (204 tier-1, 38 tier-2, 1372 tier-3). Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
1 parent
8011cf4da2
commit
b5d2670fa3
3 files changed
+7
-3
No files matched your search
@@ -72,8 +72,8 @@ def _compute_tiers(registry: list[dict], relationships: list[dict]) -> dict[str,
|
||||
rel_counts: dict[str, int] = defaultdict(int)
|
||||
|
||||
for rel in relationships:
|
||||
src = rel.get("source", "")
|
||||
tgt = rel.get("target", "")
|
||||
src = rel.get("source_name", rel.get("source", ""))
|
||||
tgt = rel.get("target_name", rel.get("target", ""))
|
||||
rtype = rel.get("relationship_type", "")
|
||||
|
||||
rel_counts[src] += 1
|
||||
@@ -232,7 +232,7 @@ def main():
|
||||
print(f" Tier {tier}: {tier_counts[tier]} persons")
|
||||
|
||||
OUTPUT_PATH.parent.mkdir(parents=True, exist_ok=True)
|
||||
OUTPUT_PATH.write_text(json.dumps(result, indent=2))
|
||||
OUTPUT_PATH.write_text(json.dumps(result, separators=(",", ":")))
|
||||
print(f"Wrote {OUTPUT_PATH}")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user