mirror of
https://github.com/PR0M3TH3AN/unredact.git
synced 2026-10-27 08: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
@@ -5,3 +5,6 @@ __pycache__/
|
||||
dist/
|
||||
build/
|
||||
.worktrees/
|
||||
.pids/
|
||||
solver_rs/target/
|
||||
scripts/.cache/
|
||||
@@ -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}")
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"names":{"(b) (6)":[{"person_id":"p0000","match_type":"full","tier":3}],"(b)":[{"person_id":"p0000","match_type":"first","tier":3},{"person_id":"p0001","match_type":"first","tier":3},{"person_id":"p0002","match_type":"first","tier":3}],"(6)":[{"person_id":"p0000","match_type":"last","tier":3}],"(. (6)":[{"person_id":"p0000","match_type":"initial_last","tier":3}],"( (6)":[{"person_id":"p0000","match_type":"initial_last","tier":3}],"(b) (6), (b) (7)(c)":[{"person_id":"p0001","match_type":"full","tier":3}],"(7)(c)":[{"person_id":"p0001","match_type":"last","tier":3}],"(. (7)(c)":[{"person_id":"p0001","match_type":"initial_last","tier":3}],"( (7)(c)":[{"person_id":"p0001","match_type":"initial_last","tier":3}],"(b) (7) (e)":[{"person_id":"p0002","match_type":"full","tier":3}],"(e)":[{"person_id":"p0002","match_type":"last","tier":3}],"(. (e)":[{"person_id":"p0002","match_type":"initial_last","tier":3}],"( (e)":[{"person_id":"p0002","match_type":"initial_last","tier":3}],"(marham":[{"person_id":"p0003","match_type":"full","tier":1}],"(roxeby":[{"person_id":"p0004","match_type":"full","tier":1}],"*d - cbp offcr-c":[{"person_id":"p0005","match_type":"full","tier":3}],"*d":[{"person_id":"p0005","match_type":"first","tier":3},{"person_id":"p0006","match_type":"first","tier":3},{"person_id":"p0007","match_type":"first","tier":3}],"offcr-c":[{"person_id":"p0005","match_type":"last","tier":3},{"person_id":"p0008","match_type":"last","tier":3}],"*. offcr-c":[{"person_id":"p0005","match_type":"initial_last","tier":3},{"person_id":"p0008","match_type":"initial_last","tier":3}],"* offcr-c":[{"person_id":"p0005","match_type":"initial_last","tier":3},{"person_id":"p0008","match_type":"initial_last","tier":3}],"*d - cbp officer":[{"person_id":"p0006","match_type":"full","tier":3}],"officer":[{"person_id":"p0006","match_type":"last","tier":3},{"person_id":"p0009","match_type":"last","tier":3}],"*. officer":[{"person_id":"p0006","match_type":"initial_last","tier":3},{"person_id":"p0009","match_type":"initial_last","tier":3}],"* officer":[{"person_id":"p0006","match_type":"initial_last","tier":3},{"person_id":"p0009","match_type":"initial_last","tier":3}],"*d - cbp officer-c":[{"person_id":"p0007","match_type":"full","tier":3}],"officer-c":[{"person_id":"p0007","match_type":"last","tier":3},{"person_id":"p0010","match_type":"last","tier":3}],"*. officer-c":[{"person_id":"p0007","match_type":"initial_last","tier":3},{"person_id":"p0010","match_type":"initial_last","tier":3}],"* officer-c":[{"person_id":"p0007","match_type":"initial_last","tier":3},{"person_id":"p0010","match_type":"initial_last","tier":3}],"*f - cbp offcr-c":[{"person_id":"p0008","match_type":"full","tier":3}],"*f":[{"person_id":"p0008","match_type":"first","tier":3},{"person_id":"p0009","match_type":"first","tier":3},{"person_id":"p0010","match_type":"first","tier":3}],"*f - cbp officer":[{"person_id":"p0009","match_type":"full","tier":3}],"*f - cbp officer-c":[{"person_id":"p0010","match_type":"full","tier":3}],"36653-g-1159b-n908je-pbi-tist-foia-1336-no records ?":[{"person_id":"p0011","match_type":"full","tier":3}],"36653-g-1159b-n908je-pbi-tist-foia-1336-no":[{"person_id":"p0011","match_type":"first","tier":3}],"3. ?":[{"person_id":"p0011","match_type":"initial_last","tier":3},{"person_id":"p0012","match_type":"initial_last","tier":3},{"person_id":"p0013","match_type":"initial_last","tier":3},{"person_id":"p0014","match_type":"initial_last","tier":3},{"person_id":"p0015","match_type":"initial_last","tier":3},{"person_id":"p0016","match_type":"initial_last","tier":3},{"person_id":"p0017","match_type":"initial_last","tier":3},{"person_id":"p0018","match_type":"initial_last","tier":3},{"person_id":"p0019","match_type":"initial_last","tier":3},{"person_id":"p0020","match_type":"initial_last","tier":3},{"person_id":"p0021","match_type":"initial_last","tier":3},{"person_id":"p0022","match_type":"initial_last","tier":3},{"person_id":"p0023","match_type":"initial_last","tier":3},{"person_id":"p0024","match_type":"initial_last","tier":3},{"person_id":"p0025","match_type":"initial_last","tier":3},{"person_id":"p0026","match_type":"initial_last","tier":3},{"person_id":"p0027","match_type":"initial_last","tier":3},{"person_id":"p0028","match_type":"initial_last","tier":3},{"person_id":"p0029","match_type":"initial_last","tier":3},{"person_id":"p0030","match_type":"initial_last","tier":3}],"3 ?":[{"person_id":"p0011","match_type":"initial_last","tier":3},{"person_id":"p0012","match_type":"initial_last","tier":3},{"person_id":"p0013","match_type":"initial_last","tier":3},{"person_id":"p0014","match_type":"initial_last","tier":3},{"person_id":"p0015","match_type":"initial_last","tier":3},{"person_id":"p0016","match_type":"initial_last","tier":3},{"person_id":"p0017","match_type":"initial_last","tier":3},{"person_id":"p0018","match_type":"initial_last","tier":3},{"person_id":"p0019","match_type":"initial_last","tier":3},{"person_id":"p0020","match_type":"initial_last","tiLine truncated
|
||||
Reference in new issue
Block a user