docling-core 1.1.0__py3-none-any.whl → 1.1.2__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.
- docling_core/search/package.py +1 -1
- docling_core/types/doc/base.py +5 -5
- docling_core/types/doc/document.py +3 -3
- {docling_core-1.1.0.dist-info → docling_core-1.1.2.dist-info}/METADATA +14 -15
- {docling_core-1.1.0.dist-info → docling_core-1.1.2.dist-info}/RECORD +8 -8
- {docling_core-1.1.0.dist-info → docling_core-1.1.2.dist-info}/LICENSE +0 -0
- {docling_core-1.1.0.dist-info → docling_core-1.1.2.dist-info}/WHEEL +0 -0
- {docling_core-1.1.0.dist-info → docling_core-1.1.2.dist-info}/entry_points.txt +0 -0
docling_core/search/package.py
CHANGED
|
@@ -26,7 +26,7 @@ class Package(BaseModel, extra="forbid"):
|
|
|
26
26
|
The version needs to comply with Semantic Versioning 2.0.0.
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
|
-
name: StrictStr
|
|
29
|
+
name: StrictStr = "docling-core"
|
|
30
30
|
version: Annotated[str, StringConstraints(strict=True, pattern=VERSION_PATTERN)] = (
|
|
31
31
|
importlib.metadata.version("docling-core")
|
|
32
32
|
)
|
docling_core/types/doc/base.py
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"""Define common models across CCS objects."""
|
|
7
7
|
from typing import Annotated, Literal, Optional, Union
|
|
8
8
|
|
|
9
|
-
from pydantic import BaseModel, Field, StrictStr
|
|
9
|
+
from pydantic import BaseModel, Field, PositiveInt, StrictStr
|
|
10
10
|
|
|
11
11
|
from docling_core.search.mapping import es_field
|
|
12
12
|
from docling_core.utils.alias import AliasModel
|
|
@@ -39,7 +39,7 @@ class S3Resource(BaseModel):
|
|
|
39
39
|
|
|
40
40
|
mime: str
|
|
41
41
|
path: str
|
|
42
|
-
page: Optional[
|
|
42
|
+
page: Optional[PositiveInt] = None
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
class S3Data(AliasModel):
|
|
@@ -68,7 +68,7 @@ class Prov(AliasModel):
|
|
|
68
68
|
"""Provenance."""
|
|
69
69
|
|
|
70
70
|
bbox: BoundingBox
|
|
71
|
-
page:
|
|
71
|
+
page: PositiveInt
|
|
72
72
|
span: Span
|
|
73
73
|
ref_s3_data: Optional[StrictStr] = Field(
|
|
74
74
|
default=None, alias="__ref_s3_data", json_schema_extra=es_field(suppress=True)
|
|
@@ -96,7 +96,7 @@ class PageDimensions(BaseModel):
|
|
|
96
96
|
"""Page dimensions."""
|
|
97
97
|
|
|
98
98
|
height: float
|
|
99
|
-
page:
|
|
99
|
+
page: PositiveInt
|
|
100
100
|
width: float
|
|
101
101
|
|
|
102
102
|
|
|
@@ -196,4 +196,4 @@ class PageReference(BaseModel):
|
|
|
196
196
|
|
|
197
197
|
hash: str = Field(json_schema_extra=es_field(type="keyword", ignore_above=8191))
|
|
198
198
|
model: str = Field(json_schema_extra=es_field(suppress=True))
|
|
199
|
-
page:
|
|
199
|
+
page: PositiveInt = Field(json_schema_extra=es_field(type="short"))
|
|
@@ -263,7 +263,7 @@ class MinimalDocument(
|
|
|
263
263
|
"""Minimal model for a document."""
|
|
264
264
|
|
|
265
265
|
name: StrictStr = Field(alias="_name")
|
|
266
|
-
obj_type: StrictStr = Field("document", alias="type")
|
|
266
|
+
obj_type: Optional[StrictStr] = Field("document", alias="type")
|
|
267
267
|
description: CCSDocumentDescription[
|
|
268
268
|
DescriptionAdvancedT,
|
|
269
269
|
DescriptionAnalyticsT,
|
|
@@ -291,7 +291,7 @@ class CCSDocument(
|
|
|
291
291
|
):
|
|
292
292
|
"""Model for a CCS-generated document."""
|
|
293
293
|
|
|
294
|
-
obj_type: StrictStr = Field("pdf-document", alias="type")
|
|
294
|
+
obj_type: Optional[StrictStr] = Field("pdf-document", alias="type")
|
|
295
295
|
bitmaps: Optional[list[BitmapObject]] = None
|
|
296
296
|
equations: Optional[list[BaseCell]] = None
|
|
297
297
|
footnotes: Optional[list[BaseText]] = None
|
|
@@ -355,7 +355,7 @@ class ExportedCCSDocument(
|
|
|
355
355
|
):
|
|
356
356
|
"""Document model for Docling."""
|
|
357
357
|
|
|
358
|
-
obj_type: StrictStr = Field(
|
|
358
|
+
obj_type: Optional[StrictStr] = Field(
|
|
359
359
|
"pdf-document",
|
|
360
360
|
alias="type",
|
|
361
361
|
json_schema_extra=es_field(type="keyword", ignore_above=8191),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: docling-core
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
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
|
|
@@ -35,36 +35,35 @@ Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
|
35
35
|
Project-URL: Repository, https://github.com/DS4SD/docling-core
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
37
37
|
|
|
38
|
+
# Docling Core
|
|
39
|
+
|
|
38
40
|
[](https://pypi.org/project/docling-core/)
|
|
39
|
-

|
|
41
|
+

|
|
40
42
|
[](https://python-poetry.org/)
|
|
41
43
|
[](https://github.com/psf/black)
|
|
42
44
|
[](https://pycqa.github.io/isort/)
|
|
43
45
|
[](https://mypy-lang.org/)
|
|
44
46
|
[](https://pydantic.dev)
|
|
45
47
|
[](https://github.com/pre-commit/pre-commit)
|
|
46
|
-
[](https://opensource.org/licenses/MIT)
|
|
49
49
|
|
|
50
50
|
Docling Core is a library that defines the data types in [Docling](https://ds4sd.github.io), leveraging pydantic models.
|
|
51
51
|
|
|
52
52
|
## Installation
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
poetry shell
|
|
54
|
+
To use Docling Core, simply install `docling-core` from your package manager, e.g. pip:
|
|
55
|
+
```bash
|
|
56
|
+
pip install docling-core
|
|
58
57
|
```
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
### Development setup
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
To develop for Docling Core, you need Python 3.9 / 3.10 / 3.11 / 3.12 and Poetry. You can then install from your local clone's root dir:
|
|
62
|
+
```bash
|
|
63
63
|
poetry install
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
To run the pytest suite, execute:
|
|
68
67
|
```
|
|
69
68
|
poetry run pytest test
|
|
70
69
|
```
|
|
@@ -114,7 +113,7 @@ Please read [Contributing to Docling Core](./CONTRIBUTING.md) for details.
|
|
|
114
113
|
|
|
115
114
|
## References
|
|
116
115
|
|
|
117
|
-
If you use
|
|
116
|
+
If you use Docling Core in your projects, please consider citing the following:
|
|
118
117
|
|
|
119
118
|
```bib
|
|
120
119
|
@software{Docling,
|
|
@@ -129,6 +128,6 @@ year = {2024}
|
|
|
129
128
|
|
|
130
129
|
## License
|
|
131
130
|
|
|
132
|
-
The
|
|
131
|
+
The Docling Core codebase is under MIT license.
|
|
133
132
|
For individual model usage, please refer to the model licenses found in the original packages.
|
|
134
133
|
|
|
@@ -12,15 +12,15 @@ docling_core/search/__init__.py,sha256=RucCUQjDlTZ7VfgbfnKDRBL-A-_Lcc2JWWeiVWHto
|
|
|
12
12
|
docling_core/search/json_schema_to_search_mapper.py,sha256=9crSFuSbcXrJej7j1rYWK6b0x37cHDmPF6va5j3gknA,12933
|
|
13
13
|
docling_core/search/mapping.py,sha256=6rqG7LgYSeWmooKNEcRa5gFDLp1ZdzPqDGlwTA5gpOk,724
|
|
14
14
|
docling_core/search/meta.py,sha256=wSurrsqdP1N3gQKx027fVdzVmc33a7Y6rPl-FClQvtA,3318
|
|
15
|
-
docling_core/search/package.py,sha256=
|
|
15
|
+
docling_core/search/package.py,sha256=Lz2ml2eDy5t0ZimnGTq-DXHAn-f18w0bn4H5xrhs75A,1841
|
|
16
16
|
docling_core/types/__init__.py,sha256=6mrAEKRW85uHJwNQBufwjPcMWCjm3oocA6MaO4_NLgg,805
|
|
17
17
|
docling_core/types/base.py,sha256=fNtfQ20NKa_RBNBWbq0DfO8o0zC1Cec8UAMu0Znsltk,8170
|
|
18
18
|
docling_core/types/doc/__init__.py,sha256=Pzj_8rft6SJTVTCHgXRwHtuZjL6LK_6dcBWjikL9biY,125
|
|
19
|
-
docling_core/types/doc/base.py,sha256
|
|
19
|
+
docling_core/types/doc/base.py,sha256=ihkr_RqcyK_ngRFhTc1OhQiilIYymw5_0cgBe7VdVq0,5553
|
|
20
20
|
docling_core/types/doc/doc_ann.py,sha256=8pV2efUglw19jxl4_oqB__mSxjWvtGIcllyCdqA-b2s,1196
|
|
21
21
|
docling_core/types/doc/doc_ocr.py,sha256=6PC0C-OczF-MyfgRxEI1xs3PWgNOzi7i2yEQbTqZz0I,1387
|
|
22
22
|
docling_core/types/doc/doc_raw.py,sha256=Y69G6IiauNDaoT-5el4xo1ypWpnBJQ75akGGkCMTZSc,3888
|
|
23
|
-
docling_core/types/doc/document.py,sha256=
|
|
23
|
+
docling_core/types/doc/document.py,sha256=nkJbdYLm0NEuYwvB0UumQCS1Gb_8dHJPXWh9HE1ot4I,16466
|
|
24
24
|
docling_core/types/gen/__init__.py,sha256=C6TuCfvpSnSL5XDOFMcYHUY2-i08vvfOGRcdu6Af0pI,124
|
|
25
25
|
docling_core/types/gen/generic.py,sha256=l4CZ4_Lb8ONG36WNJWbKX5hGKvTh_yU-hXp5hsm7uVU,844
|
|
26
26
|
docling_core/types/nlp/__init__.py,sha256=hGcztAeVK7xkRBqRRvc4zbY4PGeJ0r0QrEsetnSx9nI,119
|
|
@@ -39,8 +39,8 @@ docling_core/utils/ds_generate_docs.py,sha256=0xGBagdC_PGjyeHXYZo90VnVrSTMZgHb0S
|
|
|
39
39
|
docling_core/utils/ds_generate_jsonschema.py,sha256=EhNQutqWJFWuN-yl9UUPFZ7DJTvGqg54qBIvUMHTHdA,1647
|
|
40
40
|
docling_core/utils/validate.py,sha256=3FmnxnKTDZC5J9OGxCL3U3DGRl0t0bBV1NcySXswdas,2031
|
|
41
41
|
docling_core/utils/validators.py,sha256=fBdyWX4PvFh7o_d25ZTs4iwmeo75QTbrxsvXv2kXkTg,2777
|
|
42
|
-
docling_core-1.1.
|
|
43
|
-
docling_core-1.1.
|
|
44
|
-
docling_core-1.1.
|
|
45
|
-
docling_core-1.1.
|
|
46
|
-
docling_core-1.1.
|
|
42
|
+
docling_core-1.1.2.dist-info/LICENSE,sha256=2M9-6EoQ1sxFztTOkXGAtwUDJvnWaAHdB9BYWVwGkIw,1087
|
|
43
|
+
docling_core-1.1.2.dist-info/METADATA,sha256=_6KPgXt_4k2BdT7Pu6RiOvZ3DMQ4nnZ5lpgdK73IHeY,5335
|
|
44
|
+
docling_core-1.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
45
|
+
docling_core-1.1.2.dist-info/entry_points.txt,sha256=XHhtJEkdUuLxXSNxLdFIzx_siQ3z2UFQEKp-P8VYAE4,189
|
|
46
|
+
docling_core-1.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|