fix: expand us-cpa extraction review and rendering
This commit is contained in:
@@ -13,7 +13,11 @@ from us_cpa.sources import TaxYearCorpus
|
||||
def _load_case_facts(case_dir: Path) -> dict[str, Any]:
|
||||
facts_path = case_dir / "extracted" / "facts.json"
|
||||
payload = json.loads(facts_path.read_text())
|
||||
return {key: value["value"] for key, value in payload["facts"].items()}
|
||||
facts = {key: value["value"] for key, value in payload["facts"].items()}
|
||||
facts["_factMetadata"] = {
|
||||
key: {"sources": value.get("sources", [])} for key, value in payload["facts"].items()
|
||||
}
|
||||
return facts
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user