| 213 | |
| 214 | |
| 215 | def source_index(source_manifest: dict) -> dict: |
| 216 | if not isinstance(source_manifest, dict): |
| 217 | return {} |
| 218 | return { |
| 219 | "raw_sections_path": source_manifest.get("raw_sections_path", ""), |
| 220 | "full_text_md_path": source_manifest.get("full_text_md_path", ""), |
| 221 | "sections": source_manifest.get("sections", []) or [], |
| 222 | "pages": source_manifest.get("pages", []) or [], |
| 223 | "captions": source_manifest.get("captions", {}) or {}, |
| 224 | "math_index": source_manifest.get("math_index", []) or [], |
| 225 | "appendix_index": source_manifest.get("appendix_index", {}) or {}, |
| 226 | "language_hint": source_manifest.get("language_hint", "unknown"), |
| 227 | "text_hash_sha256": source_manifest.get("text_hash_sha256", ""), |
| 228 | } |
| 229 | |
| 230 | |
| 231 | def figure_table_manifest( |