docling-project / docling-project/docling-core
Review the serialization of tables in triplet format
- Dominant language
- HTML
- Stars
- 282
- Forks
- 214
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 21
Description
The `TripletTableSerializer` aims at serializing tables to a text format that could be understood by LLMs for downstream applications like RAG.
The implementation connects a column, a row, and the content of the cell in the given column and row to create _sentences_ of the style `A, B = C.`
The implementation needs to be reviewed, since it takes assumptions on the role of the first column and the first row to build the triplet representation of the table cells.
For instance, the inner table in `test/data/doc/rich_table.gt.html`:
will be serialized as follows (refer to the ground truth file [`0c_out_chunks.json`](https://github.com/docling-project/docling-core/blob/main/test/data/chunker/0c_out_chunks.json):
```text
text in italic
cell 0,0, 1 = cell 0,1. cell 1,0, 1 =
- \n
- list item 1 \n
- list item 2 \n
Some text in a generic group.
\nMore text in the group.
, 1 = cell 4,1```
Contributor guide
Assessment
This issue has not been assessed yet.