mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
refactor(HTML): handle text from styled html (#1960)
* A new HTML backend that handles styled html (ignors it) as well as images. Images are parsed as placeholders with a caption, if it exists. Co-authored-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> Co-authored-by: vaaale <2428222+vaaale@users.noreply.github.com> Signed-off-by: Alexander Vaagan <alexander.vaagan@gmail.com> Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> Signed-off-by: vaaale <2428222+vaaale@users.noreply.github.com> * tests(HTML): re-enable test_ordered_lists Re-enable test_ordered_lists regression test for the HTML backend since docling-core now supports ordered lists with custom start value. Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> --------- Signed-off-by: Alexander Vaagan <alexander.vaagan@gmail.com> Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> Signed-off-by: vaaale <2428222+vaaale@users.noreply.github.com> Co-authored-by: Alexander Vaagan <2428222+vaaale@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5d98bcea1b
commit
a069b1175b
27
tests/data/groundtruth/docling_v2/example_09.html.itxt
vendored
Normal file
27
tests/data/groundtruth/docling_v2/example_09.html.itxt
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
item-0 at level 0: unspecified: group _root_
|
||||
item-1 at level 1: title: Introduction to parsing HTML files with Docling
|
||||
item-2 at level 2: picture
|
||||
item-2 at level 3: caption: Docling
|
||||
item-3 at level 2: text: Docling simplifies document proc ... ntegrations with the gen AI ecosystem.
|
||||
item-4 at level 2: section_header: Supported file formats
|
||||
item-5 at level 3: text: Docling supports multiple file formats..
|
||||
item-6 at level 3: list: group list
|
||||
item-7 at level 4: list_item: Advanced PDF understanding
|
||||
item-8 at level 4: picture
|
||||
item-8 at level 5: caption: PDF
|
||||
item-9 at level 4: list_item: Microsoft Office DOCX
|
||||
item-10 at level 4: picture
|
||||
item-10 at level 5: caption: DOCX
|
||||
item-11 at level 4: list_item: HTML files (with optional support for images)
|
||||
item-12 at level 4: picture
|
||||
item-12 at level 5: caption: HTML
|
||||
item-13 at level 3: section_header: Three backends for handling HTML files
|
||||
item-14 at level 4: text: Docling has three backends for parsing HTML files:
|
||||
item-15 at level 4: list: group ordered list
|
||||
item-16 at level 5: list_item: HTMLDocumentBackend Ignores images
|
||||
item-17 at level 5: list_item: HTMLDocumentBackendImagesInline Extracts images inline
|
||||
item-18 at level 5: list_item: HTMLDocumentBackendImagesReferenced Extracts images as references
|
||||
item-19 at level 1: caption: Docling
|
||||
item-20 at level 1: caption: PDF
|
||||
item-21 at level 1: caption: DOCX
|
||||
item-22 at level 1: caption: HTML
|
||||
Reference in New Issue
Block a user