extract-python 0.11.0__tar.gz → 0.11.2__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.
- {extract_python-0.11.0 → extract_python-0.11.2}/PKG-INFO +2 -2
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/miner_u.py +5 -4
- {extract_python-0.11.0 → extract_python-0.11.2}/pyproject.toml +1 -1
- {extract_python-0.11.0 → extract_python-0.11.2}/.gitignore +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/.python-version +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/README.md +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/benches/__init__.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/benches/compare.ipynb +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/benches/compare.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/benches/constants.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/data/.gitignore +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/__init__.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/__main__.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/cli/__init__.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/cli/doc.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/cli/utils.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/constants.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/docling_.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/marker_.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/extract_python/utils.py +0 -0
- {extract_python-0.11.0 → extract_python-0.11.2}/uv.lock +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: extract-python
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.2
|
|
4
4
|
Summary: Structured content extraction
|
|
5
5
|
Project-URL: Homepage, https://github.com/ICIJ/extract-python
|
|
6
6
|
Project-URL: Repository, https://github.com/ICIJ/extract-python
|
|
7
7
|
Project-URL: Issues, https://github.com/ICIJ/extract-python/issues
|
|
8
8
|
Author-email: Clément Doumouro <cdoumouro@icij.org>
|
|
9
9
|
Requires-Python: <3.15,>=3.13
|
|
10
|
-
Requires-Dist: extract-core~=0.
|
|
10
|
+
Requires-Dist: extract-core~=0.11.3
|
|
11
11
|
Requires-Dist: icij-common~=0.8.2
|
|
12
12
|
Requires-Dist: pympler~=1.1
|
|
13
13
|
Provides-Extra: benches
|
|
@@ -16,7 +16,8 @@ from extract_core import (
|
|
|
16
16
|
Result,
|
|
17
17
|
Status,
|
|
18
18
|
)
|
|
19
|
-
from mineru import MiddleJson, ParseResult
|
|
19
|
+
from mineru import MiddleJson, MinerUParser, ParseResult
|
|
20
|
+
from mineru.config import VlmConfig
|
|
20
21
|
|
|
21
22
|
from .constants import ARTIFACTS, DEFAULT_MD_PAGE_SEP
|
|
22
23
|
from .utils import path_to_artifacts_dirname, reset_env, write_pages
|
|
@@ -34,18 +35,18 @@ class MinerUPipeline(Pipeline):
|
|
|
34
35
|
async def extract_content(
|
|
35
36
|
self, docs: Iterable[InputDoc], output_format: OutputFormat, output_path: Path
|
|
36
37
|
) -> AsyncIterable[Result]:
|
|
37
|
-
from mineru import MinerUParser # noqa: PLC0415
|
|
38
38
|
|
|
39
39
|
with reset_env():
|
|
40
40
|
os.environ["MINERU_DEVICE_MODE"] = self._device
|
|
41
41
|
# TODO: exclude files which are not pdf and return an error
|
|
42
42
|
# TODO: we should only process valid PDFs
|
|
43
43
|
config = self._config.config
|
|
44
|
+
vlm_config = VlmConfig.model_validate(config.vlm_config)
|
|
44
45
|
parser = MinerUParser(
|
|
45
|
-
tier=config.tier,
|
|
46
|
+
tier=config.tier.to_mineru(),
|
|
46
47
|
parse_mode=config.parse_mode,
|
|
47
48
|
image_analysis=config.image_analysis,
|
|
48
|
-
vlm_config=
|
|
49
|
+
vlm_config=vlm_config,
|
|
49
50
|
)
|
|
50
51
|
for doc in docs:
|
|
51
52
|
res = await parser.parse_async(doc.path)
|
|
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
|