docling-core 2.3.0__py3-none-any.whl → 2.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of docling-core might be problematic. Click here for more details.

@@ -183,14 +183,15 @@ class HierarchicalChunker(BaseChunker):
183
183
  )
184
184
  list_items = [] # reset
185
185
 
186
- if isinstance(
187
- item, SectionHeaderItem
188
- ) or ( # TODO remove when all captured as SectionHeaderItem:
186
+ if isinstance(item, SectionHeaderItem) or (
189
187
  isinstance(item, TextItem)
190
- and item.label == DocItemLabel.SECTION_HEADER
188
+ and item.label in [DocItemLabel.SECTION_HEADER, DocItemLabel.TITLE]
191
189
  ):
192
- # TODO second branch not needed once cleanup above complete:
193
- level = item.level if isinstance(item, SectionHeaderItem) else 1
190
+ level = (
191
+ item.level
192
+ if isinstance(item, SectionHeaderItem)
193
+ else (0 if item.label == DocItemLabel.TITLE else 1)
194
+ )
194
195
  heading_by_level[level] = item.text
195
196
 
196
197
  # remove headings of higher level as they just went out of scope
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: docling-core
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: A python library to define and validate data types in Docling.
5
5
  Home-page: https://ds4sd.github.io/
6
6
  License: MIT
@@ -16,7 +16,7 @@ docling_core/search/package.py,sha256=Lz2ml2eDy5t0ZimnGTq-DXHAn-f18w0bn4H5xrhs75
16
16
  docling_core/transforms/__init__.py,sha256=P81y_oqkiTN4Ld5crh1gQ6BbHqqR6C6nBt9ACDd57ds,106
17
17
  docling_core/transforms/chunker/__init__.py,sha256=sSSTnt7ZCt8Og1e0jhApNTtA0pyyHyzwcl8yXFLb2J8,292
18
18
  docling_core/transforms/chunker/base.py,sha256=iPouZOJ3cYWvai4P0Gpd3QmsTKQuY5fFUXzTMk_XNmE,1571
19
- docling_core/transforms/chunker/hierarchical_chunker.py,sha256=uG7nNoUCFqWeQAKydQg731JYJ9sayUe4J48nMF0VHE8,8097
19
+ docling_core/transforms/chunker/hierarchical_chunker.py,sha256=V4FiOYqL0GgBqVB7x6CafAJs3WF5oYifKIiexVggGPE,8086
20
20
  docling_core/types/__init__.py,sha256=MVRSgsk5focwGyAplh_TRR3dEecIXpd98g_u3zZ5HXo,260
21
21
  docling_core/types/base.py,sha256=PusJskRVL19y-hq0BgXr5e8--QEqSqLnFNJ8UbOqW88,8318
22
22
  docling_core/types/doc/__init__.py,sha256=bEL4zKVOG7Wxm6xQrgF58mu-Teds9aSavuEAKVNhrTU,639
@@ -49,8 +49,8 @@ docling_core/utils/generate_docs.py,sha256=BdKAoduWXOc7YMvcmlhjoJOFlUxij1ybxglj6
49
49
  docling_core/utils/generate_jsonschema.py,sha256=uNX1O5XnjyB5nA66XqZXTt3YbGuR2tyi_OhHepHYtZg,1654
50
50
  docling_core/utils/validate.py,sha256=3FmnxnKTDZC5J9OGxCL3U3DGRl0t0bBV1NcySXswdas,2031
51
51
  docling_core/utils/validators.py,sha256=azcrndLzhNkTWnbFSu9shJ5D3j_znnLrIFA5R8hzmGU,2798
52
- docling_core-2.3.0.dist-info/LICENSE,sha256=2M9-6EoQ1sxFztTOkXGAtwUDJvnWaAHdB9BYWVwGkIw,1087
53
- docling_core-2.3.0.dist-info/METADATA,sha256=1cthKA2Ke9tujdMQzh4sNnBB1K90yFNQ9TCvD2MhKDI,5432
54
- docling_core-2.3.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
55
- docling_core-2.3.0.dist-info/entry_points.txt,sha256=jIxlWv3tnO04irlZc0zfhqJIgz1bg9Hha4AkaLWSdUA,177
56
- docling_core-2.3.0.dist-info/RECORD,,
52
+ docling_core-2.3.1.dist-info/LICENSE,sha256=2M9-6EoQ1sxFztTOkXGAtwUDJvnWaAHdB9BYWVwGkIw,1087
53
+ docling_core-2.3.1.dist-info/METADATA,sha256=mASC44D6AB2bIACFr2oGrsZHtHRzn5e1wjBJyy6ccns,5432
54
+ docling_core-2.3.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
55
+ docling_core-2.3.1.dist-info/entry_points.txt,sha256=jIxlWv3tnO04irlZc0zfhqJIgz1bg9Hha4AkaLWSdUA,177
56
+ docling_core-2.3.1.dist-info/RECORD,,