extract-python 0.8.1__tar.gz → 0.8.3__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.8.1 → extract_python-0.8.3}/PKG-INFO +1 -1
- {extract_python-0.8.1 → extract_python-0.8.3}/extract_python/utils.py +2 -5
- {extract_python-0.8.1 → extract_python-0.8.3}/.gitignore +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/.python-version +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/README.md +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/benches/__init__.py +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/benches/compare.ipynb +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/benches/compare.py +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/benches/constants.py +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/data/.gitignore +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/extract_python/__init__.py +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/extract_python/constants.py +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/extract_python/docling_.py +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/extract_python/marker_.py +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/extract_python/miner_u.py +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/pyproject.toml +0 -0
- {extract_python-0.8.1 → extract_python-0.8.3}/uv.lock +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import gc
|
|
2
1
|
import itertools
|
|
3
2
|
import logging
|
|
4
3
|
import os
|
|
@@ -231,10 +230,8 @@ def batch_per_pages(
|
|
|
231
230
|
max_pages = page_batch_size * max_page_batches
|
|
232
231
|
docs = itertools.batched(docs, chunk_size, strict=False)
|
|
233
232
|
for chunk in docs:
|
|
234
|
-
short_docs =
|
|
235
|
-
long_docs =
|
|
236
|
-
del chunk
|
|
237
|
-
gc.collect()
|
|
233
|
+
short_docs = (d for d in chunk if d.n_pages <= max_pages)
|
|
234
|
+
long_docs = (d for d in chunk if d.n_pages > max_pages)
|
|
238
235
|
# Bin fill for docs smaller than max_pages
|
|
239
236
|
offset = yield from _bin_fill(short_docs, max_pages=max_pages)
|
|
240
237
|
# otherwise we just yield chunks of max_pages except the last chunk which is
|
|
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
|