docling 1.8.4__tar.gz → 1.8.5__tar.gz
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.
- {docling-1.8.4 → docling-1.8.5}/PKG-INFO +3 -3
- {docling-1.8.4 → docling-1.8.5}/docling/datamodel/base_models.py +3 -3
- {docling-1.8.4 → docling-1.8.5}/docling/models/ds_glm_model.py +5 -1
- {docling-1.8.4 → docling-1.8.5}/docling/models/table_structure_model.py +10 -1
- {docling-1.8.4 → docling-1.8.5}/pyproject.toml +3 -3
- {docling-1.8.4 → docling-1.8.5}/LICENSE +0 -0
- {docling-1.8.4 → docling-1.8.5}/README.md +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/__init__.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/backend/__init__.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/backend/abstract_backend.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/backend/docling_parse_backend.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/backend/pypdfium2_backend.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/datamodel/__init__.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/datamodel/document.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/datamodel/settings.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/document_converter.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/models/__init__.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/models/base_ocr_model.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/models/easyocr_model.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/models/layout_model.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/models/page_assemble_model.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/pipeline/__init__.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/pipeline/base_model_pipeline.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/pipeline/standard_model_pipeline.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/utils/__init__.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/utils/layout_utils.py +0 -0
- {docling-1.8.4 → docling-1.8.5}/docling/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: docling
|
3
|
-
Version: 1.8.
|
3
|
+
Version: 1.8.5
|
4
4
|
Summary: Docling PDF conversion package
|
5
5
|
Home-page: https://github.com/DS4SD/docling
|
6
6
|
License: MIT
|
@@ -20,10 +20,10 @@ Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
21
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
22
22
|
Requires-Dist: certifi (>=2024.7.4)
|
23
|
-
Requires-Dist: deepsearch-glm (>=0.19.0
|
23
|
+
Requires-Dist: deepsearch-glm (>=0.19.1,<0.20.0)
|
24
24
|
Requires-Dist: docling-core (>=1.1.2,<2.0.0)
|
25
25
|
Requires-Dist: docling-ibm-models (>=1.1.3,<2.0.0)
|
26
|
-
Requires-Dist: docling-parse (>=1.1.
|
26
|
+
Requires-Dist: docling-parse (>=1.1.3,<2.0.0)
|
27
27
|
Requires-Dist: easyocr (>=1.7,<2.0)
|
28
28
|
Requires-Dist: filetype (>=1.2.0,<2.0.0)
|
29
29
|
Requires-Dist: huggingface_hub (>=0.23,<1)
|
@@ -238,9 +238,9 @@ class EquationPrediction(BaseModel):
|
|
238
238
|
|
239
239
|
class PagePredictions(BaseModel):
|
240
240
|
layout: LayoutPrediction = None
|
241
|
-
tablestructure: TableStructurePrediction = None
|
242
|
-
figures_classification: FigureClassificationPrediction = None
|
243
|
-
equations_prediction: EquationPrediction = None
|
241
|
+
tablestructure: Optional[TableStructurePrediction] = None
|
242
|
+
figures_classification: Optional[FigureClassificationPrediction] = None
|
243
|
+
equations_prediction: Optional[EquationPrediction] = None
|
244
244
|
|
245
245
|
|
246
246
|
PageElement = Union[TextElement, TableElement, FigureElement]
|
@@ -16,8 +16,12 @@ from docling.datamodel.document import ConversionResult
|
|
16
16
|
class GlmModel:
|
17
17
|
def __init__(self, config):
|
18
18
|
self.config = config
|
19
|
+
self.model_names = self.config.get(
|
20
|
+
"model_names", ""
|
21
|
+
) # "language;term;reference"
|
19
22
|
load_pretrained_nlp_models()
|
20
|
-
model = init_nlp_model(model_names="language;term;reference")
|
23
|
+
# model = init_nlp_model(model_names="language;term;reference")
|
24
|
+
model = init_nlp_model(model_names=self.model_names)
|
21
25
|
self.model = model
|
22
26
|
|
23
27
|
def __call__(self, conv_res: ConversionResult) -> DsDocument:
|
@@ -44,7 +44,16 @@ class TableStructureModel:
|
|
44
44
|
|
45
45
|
for tc in table_element.table_cells:
|
46
46
|
x0, y0, x1, y1 = tc.bbox.as_tuple()
|
47
|
-
|
47
|
+
if tc.column_header:
|
48
|
+
width = 3
|
49
|
+
else:
|
50
|
+
width = 1
|
51
|
+
draw.rectangle([(x0, y0), (x1, y1)], outline="blue", width=width)
|
52
|
+
draw.text(
|
53
|
+
(x0 + 3, y0 + 3),
|
54
|
+
text=f"{tc.start_row_offset_idx}, {tc.start_col_offset_idx}",
|
55
|
+
fill="black",
|
56
|
+
)
|
48
57
|
|
49
58
|
image.show()
|
50
59
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "docling"
|
3
|
-
version = "1.8.
|
3
|
+
version = "1.8.5" # DO NOT EDIT, updated automatically
|
4
4
|
description = "Docling PDF conversion package"
|
5
5
|
authors = ["Christoph Auer <cau@zurich.ibm.com>", "Michele Dolfi <dol@zurich.ibm.com>", "Maxim Lysak <mly@zurich.ibm.com>", "Nikos Livathinos <nli@zurich.ibm.com>", "Ahmed Nassar <ahn@zurich.ibm.com>", "Peter Staar <taa@zurich.ibm.com>"]
|
6
6
|
license = "MIT"
|
@@ -25,14 +25,14 @@ python = "^3.10"
|
|
25
25
|
pydantic = "^2.0.0"
|
26
26
|
docling-core = "^1.1.2"
|
27
27
|
docling-ibm-models = "^1.1.3"
|
28
|
-
deepsearch-glm = "
|
28
|
+
deepsearch-glm = "^0.19.1"
|
29
29
|
filetype = "^1.2.0"
|
30
30
|
pypdfium2 = "^4.30.0"
|
31
31
|
pydantic-settings = "^2.3.0"
|
32
32
|
huggingface_hub = ">=0.23,<1"
|
33
33
|
requests = "^2.32.3"
|
34
34
|
easyocr = "^1.7"
|
35
|
-
docling-parse = "^1.1.
|
35
|
+
docling-parse = "^1.1.3"
|
36
36
|
certifi = ">=2024.7.4"
|
37
37
|
rtree = "^1.3.0"
|
38
38
|
scipy = "^1.14.1"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|