docling-core 2.39.0__py3-none-any.whl → 2.40.0__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/types/doc/document.py +5 -3
- docling_core/types/doc/page.py +3 -2
- {docling_core-2.39.0.dist-info → docling_core-2.40.0.dist-info}/METADATA +1 -1
- {docling_core-2.39.0.dist-info → docling_core-2.40.0.dist-info}/RECORD +8 -8
- {docling_core-2.39.0.dist-info → docling_core-2.40.0.dist-info}/WHEEL +0 -0
- {docling_core-2.39.0.dist-info → docling_core-2.40.0.dist-info}/entry_points.txt +0 -0
- {docling_core-2.39.0.dist-info → docling_core-2.40.0.dist-info}/licenses/LICENSE +0 -0
- {docling_core-2.39.0.dist-info → docling_core-2.40.0.dist-info}/top_level.txt +0 -0
|
@@ -731,9 +731,11 @@ class ProvenanceItem(BaseModel):
|
|
|
731
731
|
class ContentLayer(str, Enum):
|
|
732
732
|
"""ContentLayer."""
|
|
733
733
|
|
|
734
|
-
BODY = "body"
|
|
735
|
-
FURNITURE = "furniture"
|
|
736
|
-
BACKGROUND = "background"
|
|
734
|
+
BODY = "body" # main content of the document
|
|
735
|
+
FURNITURE = "furniture" # eg page-headers/footers
|
|
736
|
+
BACKGROUND = "background" # eg watermarks
|
|
737
|
+
INVISIBLE = "invisible" # hidden or invisible text
|
|
738
|
+
NOTES = "notes" # author/speaker notes, corrections, etc
|
|
737
739
|
|
|
738
740
|
|
|
739
741
|
DEFAULT_CONTENT_LAYERS = {ContentLayer.BODY}
|
docling_core/types/doc/page.py
CHANGED
|
@@ -122,6 +122,8 @@ class BoundingRectangle(BaseModel):
|
|
|
122
122
|
p_1 = ((self.r_x1 + self.r_x2) / 2.0, (self.r_y1 + self.r_y2) / 2.0)
|
|
123
123
|
|
|
124
124
|
delta_x, delta_y = p_1[0] - p_0[0], p_1[1] - p_0[1]
|
|
125
|
+
if self.coord_origin == CoordOrigin.TOPLEFT:
|
|
126
|
+
delta_y = -delta_y
|
|
125
127
|
|
|
126
128
|
if abs(delta_y) < 1.0e-3:
|
|
127
129
|
angle = 0.0
|
|
@@ -131,8 +133,7 @@ class BoundingRectangle(BaseModel):
|
|
|
131
133
|
angle = math.atan(delta_y / delta_x)
|
|
132
134
|
if delta_x < 0:
|
|
133
135
|
angle += np.pi
|
|
134
|
-
|
|
135
|
-
angle += 2 * np.pi
|
|
136
|
+
angle = angle % (2 * np.pi)
|
|
136
137
|
return angle
|
|
137
138
|
|
|
138
139
|
@property
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docling-core
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.40.0
|
|
4
4
|
Summary: A python library to define and validate data types in Docling.
|
|
5
5
|
Author-email: Cesar Berrospi Ramis <ceb@zurich.ibm.com>, Panos Vagenas <pva@zurich.ibm.com>, Michele Dolfi <dol@zurich.ibm.com>, Christoph Auer <cau@zurich.ibm.com>, Peter Staar <taa@zurich.ibm.com>
|
|
6
6
|
Maintainer-email: Panos Vagenas <pva@zurich.ibm.com>, Michele Dolfi <dol@zurich.ibm.com>, Christoph Auer <cau@zurich.ibm.com>, Peter Staar <taa@zurich.ibm.com>, Cesar Berrospi Ramis <ceb@zurich.ibm.com>
|
|
@@ -41,9 +41,9 @@ docling_core/types/__init__.py,sha256=MVRSgsk5focwGyAplh_TRR3dEecIXpd98g_u3zZ5HX
|
|
|
41
41
|
docling_core/types/base.py,sha256=PusJskRVL19y-hq0BgXr5e8--QEqSqLnFNJ8UbOqW88,8318
|
|
42
42
|
docling_core/types/doc/__init__.py,sha256=8hOhm5W9mArf3zwgfoMxDs1pHizhLFSAZlLu1tPBBRk,1641
|
|
43
43
|
docling_core/types/doc/base.py,sha256=ndXquBrOKTFQApIJ5s2-zstj3xlVKRbJDSId0KOQnUg,14817
|
|
44
|
-
docling_core/types/doc/document.py,sha256=
|
|
44
|
+
docling_core/types/doc/document.py,sha256=9-n0tngXLTRVAkqGHe3bDSh1OJbBt87EW2nV8GdOGME,157406
|
|
45
45
|
docling_core/types/doc/labels.py,sha256=-W1-LW6z0J9F9ExJqR0Wd1WeqWTaY3Unm-j1UkQGlC4,7330
|
|
46
|
-
docling_core/types/doc/page.py,sha256=
|
|
46
|
+
docling_core/types/doc/page.py,sha256=J_4ThNhrdhrfPtNMBTDHi-CQBvraejAwUaqVjyDeeeI,41288
|
|
47
47
|
docling_core/types/doc/tokens.py,sha256=z22l9J81_sg9CYMvOuLmPuLsNT7h_s7wao2UT89DvI8,9278
|
|
48
48
|
docling_core/types/doc/utils.py,sha256=JpAi7x9DHksFlIj_gRJPcSZOHa8AHvVPEO_K9aSnw4c,2608
|
|
49
49
|
docling_core/types/gen/__init__.py,sha256=C6TuCfvpSnSL5XDOFMcYHUY2-i08vvfOGRcdu6Af0pI,124
|
|
@@ -74,9 +74,9 @@ docling_core/utils/generate_jsonschema.py,sha256=uNX1O5XnjyB5nA66XqZXTt3YbGuR2ty
|
|
|
74
74
|
docling_core/utils/legacy.py,sha256=5lghO48OEcV9V51tRnH3YSKgLtdqhr-Q5C_OcJZ8TOs,24392
|
|
75
75
|
docling_core/utils/validate.py,sha256=aQ11UbFyl8iD_N7yTTZmm_VVeXz8KcCyn3GLXgkfYRM,2049
|
|
76
76
|
docling_core/utils/validators.py,sha256=azcrndLzhNkTWnbFSu9shJ5D3j_znnLrIFA5R8hzmGU,2798
|
|
77
|
-
docling_core-2.
|
|
78
|
-
docling_core-2.
|
|
79
|
-
docling_core-2.
|
|
80
|
-
docling_core-2.
|
|
81
|
-
docling_core-2.
|
|
82
|
-
docling_core-2.
|
|
77
|
+
docling_core-2.40.0.dist-info/licenses/LICENSE,sha256=2M9-6EoQ1sxFztTOkXGAtwUDJvnWaAHdB9BYWVwGkIw,1087
|
|
78
|
+
docling_core-2.40.0.dist-info/METADATA,sha256=A6_Wz_CJzmHa20USMUgQPDMpN5-S3f8VpNrx7ns1SXo,6453
|
|
79
|
+
docling_core-2.40.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
80
|
+
docling_core-2.40.0.dist-info/entry_points.txt,sha256=ER4zROQWkFMHIrY-oqY5E4HeCcCIg8dLkNztYGxdb7c,59
|
|
81
|
+
docling_core-2.40.0.dist-info/top_level.txt,sha256=O-tcXpGiurlud-1ZxMq1b-OmrfAVA4sajcgWU32RtfA,13
|
|
82
|
+
docling_core-2.40.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|