(hit: dict[str, Any])
| 98 | |
| 99 | |
| 100 | def summarize_hit(hit: dict[str, Any]) -> dict[str, Any]: |
| 101 | return { |
| 102 | "chunk_id": hit.get("chunk_id", ""), |
| 103 | "chapter": hit.get("chapter", ""), |
| 104 | "section": hit.get("section", ""), |
| 105 | "page_start": hit.get("page_start", -1), |
| 106 | "page_end": hit.get("page_end", -1), |
| 107 | "heading_path": hit.get("heading_path", ""), |
| 108 | "score": round(float(hit.get("score", 0.0)), 6), |
| 109 | } |
| 110 | |
| 111 | |
| 112 | def chapter_eq(left: str, right: str) -> bool: |
no outgoing calls
no test coverage detected