-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fixed docx import with headers that are also lists (#842)
* Fix for docx when headers are also lists, now recorded as appropriate headers and subheaders, unit test included Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> * Update docling/backend/msword_backend.py Co-authored-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> Signed-off-by: Maxim Lysak <101627549+maxmnemonic@users.noreply.github.com> * Update docling/backend/msword_backend.py Co-authored-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com> Signed-off-by: Maxim Lysak <101627549+maxmnemonic@users.noreply.github.com> --------- Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> Signed-off-by: Maxim Lysak <101627549+maxmnemonic@users.noreply.github.com> Co-authored-by: Maksym Lysak <mly@zurich.ibm.com> Co-authored-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
- Loading branch information
1 parent
2a1f8af
commit 2c037ae
Showing
5 changed files
with
868 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
52 changes: 52 additions & 0 deletions
52
tests/data/groundtruth/docling_v2/unit_test_headers_numbered.docx.itxt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
item-0 at level 0: unspecified: group _root_ | ||
item-1 at level 1: title: Test Document | ||
item-2 at level 2: paragraph: | ||
item-3 at level 2: section_header: Section 1 | ||
item-4 at level 1: paragraph: | ||
item-5 at level 1: paragraph: Paragraph 1.1 | ||
item-6 at level 1: paragraph: | ||
item-7 at level 1: paragraph: Paragraph 1.2 | ||
item-8 at level 1: paragraph: | ||
item-9 at level 1: section: group header-0 | ||
item-10 at level 2: section: group header-1 | ||
item-11 at level 3: section_header: Section 1.1 | ||
item-12 at level 4: paragraph: | ||
item-13 at level 4: paragraph: Paragraph 1.1.1 | ||
item-14 at level 4: paragraph: | ||
item-15 at level 4: paragraph: Paragraph 1.1.2 | ||
item-16 at level 4: paragraph: | ||
item-17 at level 3: section_header: Section 1.2 | ||
item-18 at level 4: paragraph: | ||
item-19 at level 4: paragraph: Paragraph 1.1.1 | ||
item-20 at level 4: paragraph: | ||
item-21 at level 4: paragraph: Paragraph 1.1.2 | ||
item-22 at level 4: paragraph: | ||
item-23 at level 4: section_header: Section 1.2.3 | ||
item-24 at level 5: paragraph: | ||
item-25 at level 5: paragraph: Paragraph 1.2.3.1 | ||
item-26 at level 5: paragraph: | ||
item-27 at level 5: paragraph: Paragraph 1.2.3.1 | ||
item-28 at level 5: paragraph: | ||
item-29 at level 5: paragraph: | ||
item-30 at level 2: section_header: Section 2 | ||
item-31 at level 1: paragraph: | ||
item-32 at level 1: paragraph: Paragraph 2.1 | ||
item-33 at level 1: paragraph: | ||
item-34 at level 1: paragraph: Paragraph 2.2 | ||
item-35 at level 1: paragraph: | ||
item-36 at level 1: section: group header-0 | ||
item-37 at level 2: section: group header-1 | ||
item-38 at level 3: section: group header-2 | ||
item-39 at level 4: section_header: Section 2.1.1 | ||
item-40 at level 5: paragraph: | ||
item-41 at level 5: paragraph: Paragraph 2.1.1.1 | ||
item-42 at level 5: paragraph: | ||
item-43 at level 5: paragraph: Paragraph 2.1.1.1 | ||
item-44 at level 5: paragraph: | ||
item-45 at level 3: section_header: Section 2.1 | ||
item-46 at level 4: paragraph: | ||
item-47 at level 4: paragraph: Paragraph 2.1.1 | ||
item-48 at level 4: paragraph: | ||
item-49 at level 4: paragraph: Paragraph 2.1.2 | ||
item-50 at level 4: paragraph: | ||
item-51 at level 4: paragraph: |
Oops, something went wrong.