docling/tests/data/2305.03393v1-pg9.json
Peter W. J. Staar 4794ce460a
fix: updated the render_as_doctags with the new arguments from docling-core (#93)
* updated the render_as_doctags with the new arguments from docling-core

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* ensuring that docling-core is >1.5.0 to accomodate with the latest export-to-doctags parameters

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* added the doctags tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the README

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fix poetry lock

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* Fix formatting problems

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* fixed the doctag export in docling/utils/export.py

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* propagate xsize and ysize

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Co-authored-by: Michele Dolfi <dol@zurich.ibm.com>
Co-authored-by: Christoph Auer <cau@zurich.ibm.com>
2024-09-23 20:12:18 +02:00

1 line
19 KiB
JSON

{"_name": "", "type": "pdf-document", "description": {"title": null, "abstract": null, "authors": null, "affiliations": null, "subjects": null, "keywords": null, "publication_date": null, "languages": null, "license": null, "publishers": null, "url_refs": null, "references": null, "publication": null, "reference_count": null, "citation_count": null, "citation_date": null, "advanced": null, "analytics": null, "logs": [], "collection": null, "acquisition": null}, "file-info": {"filename": "2305.03393v1-pg9.pdf", "filename-prov": null, "document-hash": "a07f5c34601ba2c234d898cbfaa9e29a7045996ccd82ccab3012516220a1f3a4", "#-pages": 1, "collection-name": null, "description": null, "page-hashes": [{"hash": "16ccd0a495625bd9c7a28a4b353d85137f3e6b09508a0d2280663478de9c9b25", "model": "default", "page": 1}]}, "main-text": [{"prov": [{"bbox": [193.9645538330078, 689.2177734375, 447.5447692871094, 700.5064697265625], "page": 1, "span": [0, 60], "__ref_s3_data": null}], "text": "Optimized Table Tokenization for Table Structure Recognition", "type": "page-header", "name": "Page-header", "font": null}, {"prov": [{"bbox": [475.1263732910156, 689.2177734375, 480.5931396484375, 700.5064697265625], "page": 1, "span": [0, 1], "__ref_s3_data": null}], "text": "9", "type": "page-header", "name": "Page-header", "font": null}, {"prov": [{"bbox": [133.8929443359375, 639.093017578125, 480.79583740234375, 675.5369873046875], "page": 1, "span": [0, 163], "__ref_s3_data": null}], "text": "order to compute the TED score. Inference timing results for all experiments were obtained from the same machine on a single core with AMD EPYC 7763 CPU @2.45 GHz.", "type": "paragraph", "name": "Text", "font": null}, {"prov": [{"bbox": [134.27793884277344, 612.7918090820312, 318.4514465332031, 625.2948608398438], "page": 1, "span": [0, 32], "__ref_s3_data": null}], "text": "5.1 Hyper Parameter Optimization", "type": "subtitle-level-1", "name": "Section-header", "font": null}, {"prov": [{"bbox": [133.84170532226562, 536.5759887695312, 481.2436218261719, 608.8849487304688], "page": 1, "span": [0, 423], "__ref_s3_data": null}], "text": "We have chosen the PubTabNet data set to perform HPO, since it includes a highly diverse set of tables. Also we report TED scores separately for simple and complex tables (tables with cell spans). Results are presented in Table. 1. It is evident that with OTSL, our model achieves the same TED score and slightly better mAP scores in comparison to HTML. However OTSL yields a 2x speed up in the inference runtime over HTML.", "type": "paragraph", "name": "Text", "font": null}, {"prov": [{"bbox": [133.8990936279297, 464.017822265625, 480.7420349121094, 519.2052612304688], "page": 1, "span": [0, 398], "__ref_s3_data": null}], "text": "Table 1. HPO performed in OTSL and HTML representation on the same transformer-based TableFormer [9] architecture, trained only on PubTabNet [22]. Effects of reducing the # of layers in encoder and decoder stages of the model show that smaller models trained on OTSL perform better, especially in recognizing complex table structures, and maintain a much higher mAP score than the HTML counterpart.", "type": "caption", "name": "Caption", "font": null}, {"name": "Table", "type": "table", "$ref": "#/tables/0"}, {"prov": [{"bbox": [134.489013671875, 273.8258056640625, 264.4082946777344, 286.3288879394531], "page": 1, "span": [0, 24], "__ref_s3_data": null}], "text": "5.2 Quantitative Results", "type": "subtitle-level-1", "name": "Section-header", "font": null}, {"prov": [{"bbox": [133.97596740722656, 173.6999969482422, 480.8291931152344, 269.9199523925781], "page": 1, "span": [0, 555], "__ref_s3_data": null}], "text": "We picked the model parameter configuration that produced the best prediction quality (enc=6, dec=6, heads=8) with PubTabNet alone, then independently trained and evaluated it on three publicly available data sets: PubTabNet (395k samples), FinTabNet (113k samples) and PubTables-1M (about 1M samples). Performance results are presented in Table. 2. It is clearly evident that the model trained on OTSL outperforms HTML across the board, keeping high TEDs and mAP scores even on difficult financial tables (FinTabNet) that contain sparse and large tables.", "type": "paragraph", "name": "Text", "font": null}, {"prov": [{"bbox": [133.89259338378906, 125.87999725341797, 480.9114074707031, 174.2779541015625], "page": 1, "span": [0, 289], "__ref_s3_data": null}], "text": "Additionally, the results show that OTSL has an advantage over HTML when applied on a bigger data set like PubTables-1M and achieves significantly improved scores. Finally, OTSL achieves faster inference due to fewer decoding steps which is a result of the reduced sequence representation.", "type": "paragraph", "name": "Text", "font": null}], "figures": [], "tables": [{"prov": [{"bbox": [139.83172607421875, 322.2643737792969, 474.81011962890625, 454.8448791503906], "page": 1, "span": [0, 0], "__ref_s3_data": null}], "text": "Table 1. HPO performed in OTSL and HTML representation on the same transformer-based TableFormer [9] architecture, trained only on PubTabNet [22]. Effects of reducing the # of layers in encoder and decoder stages of the model show that smaller models trained on OTSL perform better, especially in recognizing complex table structures, and maintain a much higher mAP score than the HTML counterpart.", "type": "table", "#-cols": 8, "#-rows": 7, "data": [[{"bbox": [160.3699951171875, 441.2538146972656, 168.04522705078125, 452.5425109863281], "spans": [[0, 0]], "text": "#", "type": "col_header", "col": 0, "col-header": false, "col-span": [0, 1], "row": 0, "row-header": false, "row-span": [0, 1]}, {"bbox": [207.9739990234375, 441.2538146972656, 215.64923095703125, 452.5425109863281], "spans": [[0, 1]], "text": "#", "type": "col_header", "col": 1, "col-header": false, "col-span": [1, 2], "row": 0, "row-header": false, "row-span": [0, 1]}, {"bbox": [239.79800415039062, 435.7748107910156, 278.33380126953125, 447.0635070800781], "spans": [[0, 2], [1, 2]], "text": "Language", "type": "col_header", "col": 2, "col-header": false, "col-span": [2, 3], "row": 0, "row-header": false, "row-span": [0, 2]}, {"bbox": [324.6700134277344, 441.2538146972656, 348.2641906738281, 452.5425109863281], "spans": [[0, 3], [0, 4], [0, 5]], "text": "TEDs", "type": "col_header", "col": 3, "col-header": false, "col-span": [3, 6], "row": 0, "row-header": false, "row-span": [0, 1]}, {"bbox": [324.6700134277344, 441.2538146972656, 348.2641906738281, 452.5425109863281], "spans": [[0, 3], [0, 4], [0, 5]], "text": "TEDs", "type": "col_header", "col": 4, "col-header": false, "col-span": [3, 6], "row": 0, "row-header": false, "row-span": [0, 1]}, {"bbox": [324.6700134277344, 441.2538146972656, 348.2641906738281, 452.5425109863281], "spans": [[0, 3], [0, 4], [0, 5]], "text": "TEDs", "type": "col_header", "col": 5, "col-header": false, "col-span": [3, 6], "row": 0, "row-header": false, "row-span": [0, 1]}, {"bbox": [396.27099609375, 441.2538146972656, 417.1259460449219, 452.5425109863281], "spans": [[0, 6]], "text": "mAP", "type": "col_header", "col": 6, "col-header": false, "col-span": [6, 7], "row": 0, "row-header": false, "row-span": [0, 1]}, {"bbox": [430.77099609375, 441.2538146972656, 467.14141845703125, 452.5425109863281], "spans": [[0, 7]], "text": "Inference", "type": "col_header", "col": 7, "col-header": false, "col-span": [7, 8], "row": 0, "row-header": false, "row-span": [0, 1]}], [{"bbox": [144.5919952392578, 428.3028259277344, 183.82894897460938, 439.5915222167969], "spans": [[1, 0]], "text": "enc-layers", "type": "col_header", "col": 0, "col-header": false, "col-span": [0, 1], "row": 1, "row-header": false, "row-span": [1, 2]}, {"bbox": [192.19500732421875, 428.3028259277344, 231.42303466796875, 439.5915222167969], "spans": [[1, 1]], "text": "dec-layers", "type": "col_header", "col": 1, "col-header": false, "col-span": [1, 2], "row": 1, "row-header": false, "row-span": [1, 2]}, {"bbox": [239.79800415039062, 435.7748107910156, 278.33380126953125, 447.0635070800781], "spans": [[0, 2], [1, 2]], "text": "Language", "type": "col_header", "col": 2, "col-header": false, "col-span": [2, 3], "row": 1, "row-header": false, "row-span": [0, 2]}, {"bbox": [286.6860046386719, 428.3028259277344, 312.328125, 439.5915222167969], "spans": [[1, 3]], "text": "simple", "type": "col_header", "col": 3, "col-header": false, "col-span": [3, 4], "row": 1, "row-header": false, "row-span": [1, 2]}, {"bbox": [320.7019958496094, 428.3028259277344, 353.71539306640625, 439.5915222167969], "spans": [[1, 4]], "text": "complex", "type": "col_header", "col": 4, "col-header": false, "col-span": [4, 5], "row": 1, "row-header": false, "row-span": [1, 2]}, {"bbox": [369.3059997558594, 428.3028259277344, 379.0291442871094, 439.5915222167969], "spans": [[1, 5]], "text": "all", "type": "col_header", "col": 5, "col-header": false, "col-span": [5, 6], "row": 1, "row-header": false, "row-span": [1, 2]}, {"bbox": [394.927001953125, 430.2948303222656, 418.4692077636719, 441.5835266113281], "spans": [[1, 6]], "text": "(0.75)", "type": "col_header", "col": 6, "col-header": false, "col-span": [6, 7], "row": 1, "row-header": false, "row-span": [1, 2]}, {"bbox": [427.14801025390625, 430.2948303222656, 470.7695617675781, 441.5835266113281], "spans": [[1, 7]], "text": "time (secs)", "type": "col_header", "col": 7, "col-header": false, "col-span": [7, 8], "row": 1, "row-header": false, "row-span": [1, 2]}], [{"bbox": [161.906005859375, 409.4728088378906, 166.51473999023438, 420.7615051269531], "spans": [[2, 0]], "text": "6", "type": "body", "col": 0, "col-header": false, "col-span": [0, 1], "row": 2, "row-header": false, "row-span": [2, 3]}, {"bbox": [209.50900268554688, 409.4728088378906, 214.11773681640625, 420.7615051269531], "spans": [[2, 1]], "text": "6", "type": "body", "col": 1, "col-header": false, "col-span": [1, 2], "row": 2, "row-header": false, "row-span": [2, 3]}, {"bbox": [245.17599487304688, 402.0008239746094, 272.9449462890625, 426.24151611328125], "spans": [[2, 2]], "text": "OTSL HTML", "type": "body", "col": 2, "col-header": false, "col-span": [2, 3], "row": 2, "row-header": false, "row-span": [2, 3]}, {"bbox": [289.0169982910156, 402.0008239746094, 310.00732421875, 426.24151611328125], "spans": [[2, 3]], "text": "0.965 0.969", "type": "body", "col": 3, "col-header": false, "col-span": [3, 4], "row": 2, "row-header": false, "row-span": [2, 3]}, {"bbox": [326.7170104980469, 402.0008239746094, 347.70733642578125, 426.24151611328125], "spans": [[2, 4]], "text": "0.934 0.927", "type": "body", "col": 4, "col-header": false, "col-span": [4, 5], "row": 2, "row-header": false, "row-span": [2, 3]}, {"bbox": [363.6759948730469, 402.0008239746094, 384.66632080078125, 426.24151611328125], "spans": [[2, 5]], "text": "0.955 0.955", "type": "body", "col": 5, "col-header": false, "col-span": [5, 6], "row": 2, "row-header": false, "row-span": [2, 3]}, {"bbox": [396.20599365234375, 402.0008239746094, 417.1963195800781, 426.3042907714844], "spans": [[2, 6]], "text": "0.88 0.857", "type": "body", "col": 6, "col-header": false, "col-span": [6, 7], "row": 2, "row-header": false, "row-span": [2, 3]}, {"bbox": [439.5270080566406, 402.0008239746094, 458.38336181640625, 426.3042907714844], "spans": [[2, 7]], "text": "2.73 5.39", "type": "body", "col": 7, "col-header": false, "col-span": [7, 8], "row": 2, "row-header": false, "row-span": [2, 3]}], [{"bbox": [161.906005859375, 383.17181396484375, 166.51473999023438, 394.46051025390625], "spans": [[3, 0]], "text": "4", "type": "body", "col": 0, "col-header": false, "col-span": [0, 1], "row": 3, "row-header": false, "row-span": [3, 4]}, {"bbox": [209.50900268554688, 383.17181396484375, 214.11773681640625, 394.46051025390625], "spans": [[3, 1]], "text": "4", "type": "body", "col": 1, "col-header": false, "col-span": [1, 2], "row": 3, "row-header": false, "row-span": [3, 4]}, {"bbox": [245.17599487304688, 375.6998291015625, 272.9449462890625, 399.93951416015625], "spans": [[3, 2]], "text": "OTSL HTML", "type": "body", "col": 2, "col-header": false, "col-span": [2, 3], "row": 3, "row-header": false, "row-span": [3, 4]}, {"bbox": [289.0169982910156, 375.6998291015625, 310.00732421875, 399.93951416015625], "spans": [[3, 3]], "text": "0.938 0.952", "type": "body", "col": 3, "col-header": false, "col-span": [3, 4], "row": 3, "row-header": false, "row-span": [3, 4]}, {"bbox": [326.7170104980469, 388.65081787109375, 347.70733642578125, 399.93951416015625], "spans": [[3, 4]], "text": "0.904", "type": "body", "col": 4, "col-header": false, "col-span": [4, 5], "row": 3, "row-header": false, "row-span": [3, 4]}, {"bbox": [363.6759948730469, 388.65081787109375, 384.66632080078125, 399.93951416015625], "spans": [[3, 5]], "text": "0.927", "type": "body", "col": 5, "col-header": false, "col-span": [5, 6], "row": 3, "row-header": false, "row-span": [3, 4]}, {"bbox": [394.6180114746094, 388.5970153808594, 418.7779846191406, 400.0022888183594], "spans": [[3, 6]], "text": "0.853", "type": "body", "col": 6, "col-header": false, "col-span": [6, 7], "row": 3, "row-header": false, "row-span": [3, 4]}, {"bbox": [439.5270080566406, 388.5970153808594, 458.38336181640625, 400.0022888183594], "spans": [[3, 7]], "text": "1.97", "type": "body", "col": 7, "col-header": false, "col-span": [7, 8], "row": 3, "row-header": false, "row-span": [3, 4]}], [{"bbox": null, "spans": [[4, 0]], "text": "", "type": "body", "col": 0, "col-header": false, "col-span": [0, 1], "row": 4, "row-header": false, "row-span": [4, 5]}, {"bbox": null, "spans": [[4, 1]], "text": "", "type": "body", "col": 1, "col-header": false, "col-span": [1, 2], "row": 4, "row-header": false, "row-span": [4, 5]}, {"bbox": [245.17599487304688, 349.3988342285156, 272.9449462890625, 373.6385192871094], "spans": [[4, 2]], "text": "OTSL HTML", "type": "body", "col": 2, "col-header": false, "col-span": [2, 3], "row": 4, "row-header": false, "row-span": [4, 5]}, {"bbox": [289.0169982910156, 362.3498229980469, 310.00732421875, 373.6385192871094], "spans": [[4, 3]], "text": "0.923", "type": "body", "col": 3, "col-header": false, "col-span": [3, 4], "row": 4, "row-header": false, "row-span": [4, 5]}, {"bbox": [326.7170104980469, 349.3988342285156, 347.70733642578125, 386.988525390625], "spans": [[4, 4]], "text": "0.909 0.897 0.901", "type": "body", "col": 4, "col-header": false, "col-span": [4, 5], "row": 4, "row-header": false, "row-span": [4, 5]}, {"bbox": [362.0880126953125, 362.3498229980469, 386.24798583984375, 387.0513000488281], "spans": [[4, 5]], "text": "0.938 0.915", "type": "body", "col": 5, "col-header": false, "col-span": [5, 6], "row": 4, "row-header": false, "row-span": [4, 5]}, {"bbox": [396.20599365234375, 375.6998291015625, 417.1963195800781, 386.988525390625], "spans": [[4, 6]], "text": "0.843", "type": "body", "col": 6, "col-header": false, "col-span": [6, 7], "row": 4, "row-header": false, "row-span": [4, 5]}, {"bbox": [440.7669982910156, 375.6998291015625, 457.150390625, 386.988525390625], "spans": [[4, 7]], "text": "3.77", "type": "body", "col": 7, "col-header": false, "col-span": [7, 8], "row": 4, "row-header": false, "row-span": [4, 5]}], [{"bbox": [161.906005859375, 356.8708190917969, 166.51473999023438, 368.1595153808594], "spans": [[5, 0]], "text": "2", "type": "body", "col": 0, "col-header": false, "col-span": [0, 1], "row": 5, "row-header": false, "row-span": [5, 6]}, {"bbox": [209.50900268554688, 356.8708190917969, 214.11773681640625, 368.1595153808594], "spans": [[5, 1]], "text": "4", "type": "body", "col": 1, "col-header": false, "col-span": [1, 2], "row": 5, "row-header": false, "row-span": [5, 6]}, {"bbox": null, "spans": [[5, 2]], "text": "", "type": "body", "col": 2, "col-header": false, "col-span": [2, 3], "row": 5, "row-header": false, "row-span": [5, 6]}, {"bbox": [289.0169982910156, 349.3988342285156, 310.00732421875, 360.6875305175781], "spans": [[5, 3]], "text": "0.945", "type": "body", "col": 3, "col-header": false, "col-span": [3, 4], "row": 5, "row-header": false, "row-span": [5, 6]}, {"bbox": null, "spans": [[5, 4]], "text": "", "type": "body", "col": 4, "col-header": false, "col-span": [4, 5], "row": 5, "row-header": false, "row-span": [5, 6]}, {"bbox": [362.0880126953125, 349.34503173828125, 386.24798583984375, 360.75030517578125], "spans": [[5, 5]], "text": "0.931", "type": "body", "col": 5, "col-header": false, "col-span": [5, 6], "row": 5, "row-header": false, "row-span": [5, 6]}, {"bbox": [394.6180114746094, 349.3988342285156, 418.7779846191406, 373.7012939453125], "spans": [[5, 6]], "text": "0.859 0.834", "type": "body", "col": 6, "col-header": false, "col-span": [6, 7], "row": 5, "row-header": false, "row-span": [5, 6]}, {"bbox": [439.5270080566406, 349.3988342285156, 458.38336181640625, 373.7012939453125], "spans": [[5, 7]], "text": "1.91 3.81", "type": "body", "col": 7, "col-header": false, "col-span": [7, 8], "row": 5, "row-header": false, "row-span": [5, 6]}], [{"bbox": [161.906005859375, 330.5688171386719, 166.51473999023438, 341.8575134277344], "spans": [[6, 0]], "text": "4", "type": "body", "col": 0, "col-header": false, "col-span": [0, 1], "row": 6, "row-header": false, "row-span": [6, 7]}, {"bbox": [209.50900268554688, 330.5688171386719, 214.11773681640625, 341.8575134277344], "spans": [[6, 1]], "text": "2", "type": "body", "col": 1, "col-header": false, "col-span": [1, 2], "row": 6, "row-header": false, "row-span": [6, 7]}, {"bbox": [245.17599487304688, 323.0968322753906, 272.9449462890625, 347.3375244140625], "spans": [[6, 2]], "text": "OTSL HTML", "type": "body", "col": 2, "col-header": false, "col-span": [2, 3], "row": 6, "row-header": false, "row-span": [6, 7]}, {"bbox": [289.0169982910156, 323.0968322753906, 310.00732421875, 347.3375244140625], "spans": [[6, 3]], "text": "0.952 0.944", "type": "body", "col": 3, "col-header": false, "col-span": [3, 4], "row": 6, "row-header": false, "row-span": [6, 7]}, {"bbox": [326.7170104980469, 323.0968322753906, 347.70733642578125, 347.3375244140625], "spans": [[6, 4]], "text": "0.92 0.903", "type": "body", "col": 4, "col-header": false, "col-span": [4, 5], "row": 6, "row-header": false, "row-span": [6, 7]}, {"bbox": [362.0880126953125, 323.0968322753906, 386.24798583984375, 347.4002990722656], "spans": [[6, 5]], "text": "0.942 0.931", "type": "body", "col": 5, "col-header": false, "col-span": [5, 6], "row": 6, "row-header": false, "row-span": [6, 7]}, {"bbox": [394.6180114746094, 323.0968322753906, 418.7779846191406, 347.4002990722656], "spans": [[6, 6]], "text": "0.857 0.824", "type": "body", "col": 6, "col-header": false, "col-span": [6, 7], "row": 6, "row-header": false, "row-span": [6, 7]}, {"bbox": [439.5270080566406, 323.0968322753906, 458.38336181640625, 347.4002990722656], "spans": [[6, 7]], "text": "1.22 2", "type": "body", "col": 7, "col-header": false, "col-span": [7, 8], "row": 6, "row-header": false, "row-span": [6, 7]}]], "model": null, "bounding-box": null}], "bitmaps": null, "equations": [], "footnotes": [], "page-dimensions": [{"height": 792.0, "page": 1, "width": 612.0}], "page-footers": [], "page-headers": [], "_s3_data": null, "identifiers": null}