docling-studio/document-parser/infra
Pier-Jean Malandrino 157a779e20 fix(graph): collapse Docling InlineGroup and Picture children (#197)
Two patterns in Docling's serialization were mirrored 1:1 by the graph
projection and produced node explosions on real documents:

- An InlineGroup (paragraph of mixed style runs) emits one `groups[]`
  entry plus N `texts[]` runs. Naive iteration created one Paragraph
  node per run.
- A Picture's `children` carry internal text labels extracted by the
  layout model (flowchart boxes, chart axis labels, diagram callouts).
  Each child became its own Paragraph node, drowning the figure.

`build_collapse_index` (in the shared `infra.docling_tree` helper) now
returns the `skip_refs` set + `inline_meta` overrides for both cases.
The Neo4j `tree_writer` and the in-memory `docling_graph` consume the
same index, so both projections stay in sync.

InlineGroups are projected as a single :Paragraph carrying the
concatenated text and the union of children's provs (re-indexed).
Pictures keep their :Figure node and prov; their descendants are
dropped. Captions live in the picture's separate `captions` field, not
in `children`, so they are unaffected.
2026-04-29 14:00:00 +02:00
..
neo4j fix(graph): collapse Docling InlineGroup and Picture children (#197) 2026-04-29 14:00:00 +02:00
__init__.py Refactor backend to hexagonal architecture for converter extensibility 2026-03-31 10:34:07 +02:00
bbox.py Move bbox.py from domain/ to infra/ and unify coordinate logic 2026-04-03 13:17:26 +02:00
docling_graph.py fix(graph): collapse Docling InlineGroup and Picture children (#197) 2026-04-29 14:00:00 +02:00
docling_tree.py fix(graph): collapse Docling InlineGroup and Picture children (#197) 2026-04-29 14:00:00 +02:00
embedding_client.py feat: add embedding microservice and EmbeddingService port 2026-04-10 20:53:24 +02:00
local_chunker.py feat(neo4j): Day 3 — ChunkWriter, graph API, GraphView, README 2026-04-29 14:00:00 +02:00
local_converter.py feat(reasoning): bidirectional PDF ↔ graph focus + DocumentView mode 2026-04-29 14:00:00 +02:00
opensearch_store.py refactor: centralize magic numbers for page dimensions, limits, and timeout (#168) 2026-04-29 14:00:00 +02:00
rate_limiter.py Add in-memory rate limiting middleware 2026-04-03 13:56:05 +02:00
serve_converter.py feat: enable chunking in remote (Docling Serve) mode 2026-04-29 14:00:00 +02:00
settings.py feat(settings): paste-image size/type limits for #195 (#196) 2026-04-29 14:00:00 +02:00