BabelDOC 0.4.21__tar.gz → 0.5.0__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.
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/workflows/codeql.yml +1 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/workflows/docs.yml +1 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/workflows/labeler.yml +1 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/workflows/lint.yml +1 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/workflows/pr-lint.yml +2 -2
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/workflows/publish-to-pypi.yml +4 -4
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/workflows/test.yml +1 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.gitignore +4 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/PKG-INFO +23 -42
- {babeldoc-0.4.21 → babeldoc-0.5.0}/README.md +21 -41
- babeldoc-0.5.0/babeldoc/__init__.py +1 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/const.py +1 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/base_doclayout.py +0 -11
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/rpc_doclayout.py +2 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/rpc_doclayout2.py +1 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/rpc_doclayout3.py +1 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/rpc_doclayout4.py +1 -0
- babeldoc-0.5.0/babeldoc/docvision/rpc_doclayout5.py +328 -0
- babeldoc-0.5.0/babeldoc/docvision/rpc_doclayout6.py +628 -0
- babeldoc-0.5.0/babeldoc/docvision/rpc_doclayout7.py +353 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/babelpdf/base14.py +14 -3
- babeldoc-0.5.0/babeldoc/format/pdf/babelpdf/utils.py +14 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/converter.py +19 -12
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/__init__.py +18 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +488 -86
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/frontend/il_creater.py +527 -67
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/il_version_1.py +419 -29
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/il_version_1.rnc +100 -20
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/il_version_1.rng +255 -67
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/il_version_1.xsd +153 -38
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +35 -9
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/il_translator.py +5 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +5 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/layout_parser.py +40 -2
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +112 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +456 -57
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/typesetting.py +202 -18
- babeldoc-0.5.0/babeldoc/format/pdf/document_il/utils/extract_char.py +753 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/utils/formular_helper.py +1 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/utils/layout_helper.py +266 -45
- babeldoc-0.5.0/babeldoc/format/pdf/document_il/utils/matrix_helper.py +335 -0
- babeldoc-0.5.0/babeldoc/format/pdf/document_il/utils/spatial_analyzer.py +158 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/high_level.py +45 -12
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/pdfinterp.py +61 -55
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/translation_config.py +26 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/main.py +100 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/converter.py +35 -6
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/layout.py +2 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdfinterp.py +3 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/pyproject.toml +3 -2
- babeldoc-0.4.21/babeldoc/__init__.py +0 -1
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.cursorignore +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/dependabot.yml +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/labels.yml +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.github/release-drafter.yml +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/LICENSE +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/result_merger.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/format/pdf/split_manager.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/glossary.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/LICENSE +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/_saslprep.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/arcfour.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/ascii85.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/casting.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/ccitt.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/README.txt +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/cmapdb.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/data_structures.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/encodingdb.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/fontmetrics.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/glyphlist.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/high_level.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/image.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/jbig2.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/latin_enc.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/lzw.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdfcolor.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdfdevice.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdfdocument.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdfexceptions.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdffont.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdfpage.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdfparser.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/pdftypes.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/psexceptions.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/psparser.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/py.typed +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/runlength.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/settings.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/pdfminer/utils.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/translator/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/translator/cache.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/translator/translator.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/utils/__init__.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/README.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/deploy.sh +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/example/demo_glossary.csv +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/index.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/requirements.txt +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/docs/supported_languages.md +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/mkdocs.yml +0 -0
- {babeldoc-0.4.21 → babeldoc-0.5.0}/tests/test_translation_cache_cleanup.py +0 -0
|
@@ -55,7 +55,7 @@ jobs:
|
|
|
55
55
|
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
|
56
56
|
steps:
|
|
57
57
|
- name: Checkout repository
|
|
58
|
-
uses: actions/checkout@
|
|
58
|
+
uses: actions/checkout@v5
|
|
59
59
|
|
|
60
60
|
# Initializes the CodeQL tools for scanning.
|
|
61
61
|
- name: Initialize CodeQL
|
|
@@ -9,7 +9,7 @@ jobs:
|
|
|
9
9
|
name: runner / ruff
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@v5
|
|
13
13
|
|
|
14
14
|
- name: Install Python
|
|
15
15
|
uses: actions/setup-python@v5
|
|
@@ -34,7 +34,7 @@ jobs:
|
|
|
34
34
|
name: runner / autocorrect
|
|
35
35
|
runs-on: ubuntu-latest
|
|
36
36
|
steps:
|
|
37
|
-
- uses: actions/checkout@
|
|
37
|
+
- uses: actions/checkout@v5
|
|
38
38
|
- name: AutoCorrect
|
|
39
39
|
uses: huacnlee/autocorrect-action@bf91ab3904c2908dd8e71312a8a83ed1eb632997 # v2.13.3
|
|
40
40
|
- name: Report ReviewDog
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
outputs:
|
|
29
29
|
is_release: ${{ steps.check-version.outputs.tag }}
|
|
30
30
|
steps:
|
|
31
|
-
- uses: actions/checkout@
|
|
31
|
+
- uses: actions/checkout@v5
|
|
32
32
|
with:
|
|
33
33
|
persist-credentials: true
|
|
34
34
|
fetch-depth: 2
|
|
@@ -90,7 +90,7 @@ jobs:
|
|
|
90
90
|
|
|
91
91
|
steps:
|
|
92
92
|
- name: Download all the dists
|
|
93
|
-
uses: actions/download-artifact@
|
|
93
|
+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
|
94
94
|
with:
|
|
95
95
|
name: python-package-distributions
|
|
96
96
|
path: dist/
|
|
@@ -114,7 +114,7 @@ jobs:
|
|
|
114
114
|
|
|
115
115
|
steps:
|
|
116
116
|
- name: Download all the dists
|
|
117
|
-
uses: actions/download-artifact@
|
|
117
|
+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
|
118
118
|
with:
|
|
119
119
|
name: python-package-distributions
|
|
120
120
|
path: dist/
|
|
@@ -139,7 +139,7 @@ jobs:
|
|
|
139
139
|
contents: write
|
|
140
140
|
pull-requests: write
|
|
141
141
|
steps:
|
|
142
|
-
- uses: actions/checkout@
|
|
142
|
+
- uses: actions/checkout@v5
|
|
143
143
|
with:
|
|
144
144
|
persist-credentials: true
|
|
145
145
|
fetch-depth: 2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BabelDOC
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Yet Another Document Translator
|
|
5
5
|
Project-URL: Homepage, https://github.com/funstory-ai/BabelDOC
|
|
6
6
|
Project-URL: Issues, https://github.com/funstory-ai/BabelDOC/issues
|
|
@@ -38,6 +38,7 @@ Requires-Dist: rapidocr-onnxruntime>=1.4.4
|
|
|
38
38
|
Requires-Dist: rich>=13.9.4
|
|
39
39
|
Requires-Dist: rtree>=1.4.0
|
|
40
40
|
Requires-Dist: scikit-image>=0.25.2
|
|
41
|
+
Requires-Dist: scikit-learn>=1.7.1
|
|
41
42
|
Requires-Dist: scipy>=1.15.3
|
|
42
43
|
Requires-Dist: tenacity>=9.0.0
|
|
43
44
|
Requires-Dist: tiktoken>=0.9.0
|
|
@@ -217,6 +218,13 @@ uv run babeldoc --files example.pdf --files example2.pdf --openai --openai-model
|
|
|
217
218
|
- `--auto-enable-ocr-workaround`: Enable automatic OCR workaround (default: False). If a document is detected as heavily scanned, this will attempt to enable OCR processing and skip further scan detection. See "Important Interaction Note" below for crucial details on how this interacts with `--ocr-workaround` and `--skip-scanned-detection`.
|
|
218
219
|
- `--primary-font-family`: Override primary font family for translated text. Choices: 'serif' for serif fonts, 'sans-serif' for sans-serif fonts, 'script' for script/italic fonts. If not specified, uses automatic font selection based on original text properties.
|
|
219
220
|
- `--only-include-translated-page`: Only include translated pages in the output PDF. This option is only effective when `--pages` is used. (default: False)
|
|
221
|
+
- `--merge-alternating-line-numbers`: Enable post-processing to merge alternating line-number layouts (keep the number paragraph as an independent paragraph b; merge adjacent text paragraphs a and c across it when `layout_id` and `xobj_id` match, digits are ASCII and spaces only). Default: off.
|
|
222
|
+
- `--skip-form-render`: Skip form rendering (default: False). When enabled, PDF forms will not be rendered in the output.
|
|
223
|
+
- `--skip-curve-render`: Skip curve rendering (default: False). When enabled, PDF curves will not be rendered in the output.
|
|
224
|
+
- `--only-parse-generate-pdf`: Only parse PDF and generate output PDF without translation (default: False). This skips all translation-related processing including layout analysis, paragraph finding, style processing, and translation itself. Useful for testing PDF parsing and reconstruction functionality.
|
|
225
|
+
- `--remove-non-formula-lines`: Remove non-formula lines from paragraph areas (default: False). This removes decorative lines that are not part of formulas, while protecting lines in figure/table areas. Useful for cleaning up documents with decorative elements that interfere with text flow.
|
|
226
|
+
- `--non-formula-line-iou-threshold`: IoU threshold for detecting paragraph overlap when removing non-formula lines (default: 0.9). Higher values are more conservative and will remove fewer lines.
|
|
227
|
+
- `--figure-table-protection-threshold`: IoU threshold for protecting lines in figure/table areas when removing non-formula lines (default: 0.9). Higher values provide more protection for structural elements in figures and tables.
|
|
220
228
|
|
|
221
229
|
- `--rpc-doclayout`: RPC service host address for document layout analysis (default: None)
|
|
222
230
|
- `--working-dir`: Working directory for translation. If not set, use temp directory.
|
|
@@ -337,6 +345,12 @@ ocr_workaround = false # Use OCR workaround for scanned PDFs
|
|
|
337
345
|
rpc_doclayout = "" # RPC service host for document layout analysis
|
|
338
346
|
working_dir = "" # Working directory for translation
|
|
339
347
|
auto_enable_ocr_workaround = false # Enable automatic OCR workaround for scanned PDFs. See docs for interaction with ocr_workaround and skip_scanned_detection.
|
|
348
|
+
skip_form_render = false # Skip form rendering (default: False)
|
|
349
|
+
skip_curve_render = false # Skip curve rendering (default: False)
|
|
350
|
+
only_parse_generate_pdf = false # Only parse PDF and generate output PDF without translation (default: False)
|
|
351
|
+
remove_non_formula_lines = false # Remove non-formula lines from paragraph areas (default: False)
|
|
352
|
+
non_formula_line_iou_threshold = 0.2 # IoU threshold for paragraph overlap detection (default: 0.2)
|
|
353
|
+
figure_table_protection_threshold = 0.3 # IoU threshold for figure/table protection (default: 0.3)
|
|
340
354
|
|
|
341
355
|
# Translation service
|
|
342
356
|
openai = true
|
|
@@ -362,48 +376,10 @@ report-interval = 0.5
|
|
|
362
376
|
|
|
363
377
|
## Python API
|
|
364
378
|
|
|
365
|
-
|
|
366
|
-
>
|
|
367
|
-
> 1. Before pdf2zh 2.0 is released, you can temporarily use BabelDOC's Python API. However, after pdf2zh 2.0 is released, please directly use pdf2zh's Python API.
|
|
368
|
-
>
|
|
369
|
-
> 2. This project's Python API does not guarantee any compatibility. However, the Python API from pdf2zh will guarantee a certain level of compatibility.
|
|
370
|
-
>
|
|
371
|
-
> 3. We do not provide any technical support for the BabelDOC API.
|
|
372
|
-
>
|
|
373
|
-
> 4. When performing secondary development, please refer to [pdf2zh 2.0 high level](https://github.com/PDFMathTranslate/PDFMathTranslate-next/blob/main/pdf2zh_next/high_level.py) and ensure that BabelDOC runs in a subprocess.
|
|
374
|
-
|
|
375
|
-
You can refer to the example in [main.py](https://github.com/funstory-ai/yadt/blob/main/babeldoc/main.py) to use BabelDOC's Python API.
|
|
376
|
-
|
|
377
|
-
Please note:
|
|
378
|
-
|
|
379
|
-
1. Make sure call `babeldoc.format.pdf.high_level.init()` before using the API
|
|
380
|
-
|
|
381
|
-
2. The current `TranslationConfig` does not fully validate input parameters, so you need to ensure the validity of input parameters
|
|
382
|
-
|
|
383
|
-
3. For offline assets management, you can use the following functions:
|
|
384
|
-
```python
|
|
385
|
-
# Generate an offline assets package
|
|
386
|
-
from pathlib import Path
|
|
387
|
-
import babeldoc.assets.assets
|
|
388
|
-
|
|
389
|
-
# Generate package to a specific directory
|
|
390
|
-
# path is optional, default is ~/.cache/babeldoc/assets/offline_assets_{hash}.zip
|
|
391
|
-
babeldoc.assets.assets.generate_offline_assets_package(Path("/path/to/output/dir"))
|
|
392
|
-
|
|
393
|
-
# Restore from a package file
|
|
394
|
-
# path is optional, default is ~/.cache/babeldoc/assets/offline_assets_{hash}.zip
|
|
395
|
-
babeldoc.assets.assets.restore_offline_assets_package(Path("/path/to/offline_assets_package.zip"))
|
|
396
|
-
|
|
397
|
-
# You can also restore from a directory containing the offline assets package
|
|
398
|
-
# The tool will automatically find the correct package file based on the hash
|
|
399
|
-
babeldoc.assets.assets.restore_offline_assets_package(Path("/path/to/directory"))
|
|
400
|
-
```
|
|
379
|
+
The current recommended way to call BabelDOC in Python is to call the `high_level.do_translate_async_stream` function of [pdf2zh next](https://github.com/PDFMathTranslate/PDFMathTranslate-next).
|
|
401
380
|
|
|
402
|
-
> [!
|
|
403
|
-
>
|
|
404
|
-
> 1. The offline assets package name cannot be modified because the file list hash is encoded in the name.
|
|
405
|
-
> 2. When using in production environments, it's recommended to pre-generate the assets package and include it with your application distribution.
|
|
406
|
-
> 3. The package verification ensures that all required assets are intact and match their expected checksums.
|
|
381
|
+
> [!WARNING]
|
|
382
|
+
> **All APIs of BabelDOC should be considered as internal APIs, and any direct use of BabelDOC is not supported.**
|
|
407
383
|
|
|
408
384
|
## Background
|
|
409
385
|
|
|
@@ -458,6 +434,11 @@ And meet the following requirements:
|
|
|
458
434
|
|
|
459
435
|
This project uses a combination of [Semantic Versioning](https://semver.org/) and [Pride Versioning](https://pridever.org/). The version number format is: "0.MAJOR.MINOR".
|
|
460
436
|
|
|
437
|
+
> [!NOTE]
|
|
438
|
+
>
|
|
439
|
+
> The API compatibility here mainly refers to the compatibility with [pdf2zh_next](https://github.com/PDFMathTranslate/PDFMathTranslate-next).
|
|
440
|
+
|
|
441
|
+
|
|
461
442
|
- MAJOR: Incremented by 1 when API incompatible changes are made or when proud improvements are implemented.
|
|
462
443
|
|
|
463
444
|
- MINOR: Incremented by 1 when any API compatible changes are made.
|
|
@@ -162,6 +162,13 @@ uv run babeldoc --files example.pdf --files example2.pdf --openai --openai-model
|
|
|
162
162
|
- `--auto-enable-ocr-workaround`: Enable automatic OCR workaround (default: False). If a document is detected as heavily scanned, this will attempt to enable OCR processing and skip further scan detection. See "Important Interaction Note" below for crucial details on how this interacts with `--ocr-workaround` and `--skip-scanned-detection`.
|
|
163
163
|
- `--primary-font-family`: Override primary font family for translated text. Choices: 'serif' for serif fonts, 'sans-serif' for sans-serif fonts, 'script' for script/italic fonts. If not specified, uses automatic font selection based on original text properties.
|
|
164
164
|
- `--only-include-translated-page`: Only include translated pages in the output PDF. This option is only effective when `--pages` is used. (default: False)
|
|
165
|
+
- `--merge-alternating-line-numbers`: Enable post-processing to merge alternating line-number layouts (keep the number paragraph as an independent paragraph b; merge adjacent text paragraphs a and c across it when `layout_id` and `xobj_id` match, digits are ASCII and spaces only). Default: off.
|
|
166
|
+
- `--skip-form-render`: Skip form rendering (default: False). When enabled, PDF forms will not be rendered in the output.
|
|
167
|
+
- `--skip-curve-render`: Skip curve rendering (default: False). When enabled, PDF curves will not be rendered in the output.
|
|
168
|
+
- `--only-parse-generate-pdf`: Only parse PDF and generate output PDF without translation (default: False). This skips all translation-related processing including layout analysis, paragraph finding, style processing, and translation itself. Useful for testing PDF parsing and reconstruction functionality.
|
|
169
|
+
- `--remove-non-formula-lines`: Remove non-formula lines from paragraph areas (default: False). This removes decorative lines that are not part of formulas, while protecting lines in figure/table areas. Useful for cleaning up documents with decorative elements that interfere with text flow.
|
|
170
|
+
- `--non-formula-line-iou-threshold`: IoU threshold for detecting paragraph overlap when removing non-formula lines (default: 0.9). Higher values are more conservative and will remove fewer lines.
|
|
171
|
+
- `--figure-table-protection-threshold`: IoU threshold for protecting lines in figure/table areas when removing non-formula lines (default: 0.9). Higher values provide more protection for structural elements in figures and tables.
|
|
165
172
|
|
|
166
173
|
- `--rpc-doclayout`: RPC service host address for document layout analysis (default: None)
|
|
167
174
|
- `--working-dir`: Working directory for translation. If not set, use temp directory.
|
|
@@ -282,6 +289,12 @@ ocr_workaround = false # Use OCR workaround for scanned PDFs
|
|
|
282
289
|
rpc_doclayout = "" # RPC service host for document layout analysis
|
|
283
290
|
working_dir = "" # Working directory for translation
|
|
284
291
|
auto_enable_ocr_workaround = false # Enable automatic OCR workaround for scanned PDFs. See docs for interaction with ocr_workaround and skip_scanned_detection.
|
|
292
|
+
skip_form_render = false # Skip form rendering (default: False)
|
|
293
|
+
skip_curve_render = false # Skip curve rendering (default: False)
|
|
294
|
+
only_parse_generate_pdf = false # Only parse PDF and generate output PDF without translation (default: False)
|
|
295
|
+
remove_non_formula_lines = false # Remove non-formula lines from paragraph areas (default: False)
|
|
296
|
+
non_formula_line_iou_threshold = 0.2 # IoU threshold for paragraph overlap detection (default: 0.2)
|
|
297
|
+
figure_table_protection_threshold = 0.3 # IoU threshold for figure/table protection (default: 0.3)
|
|
285
298
|
|
|
286
299
|
# Translation service
|
|
287
300
|
openai = true
|
|
@@ -307,48 +320,10 @@ report-interval = 0.5
|
|
|
307
320
|
|
|
308
321
|
## Python API
|
|
309
322
|
|
|
310
|
-
|
|
311
|
-
>
|
|
312
|
-
> 1. Before pdf2zh 2.0 is released, you can temporarily use BabelDOC's Python API. However, after pdf2zh 2.0 is released, please directly use pdf2zh's Python API.
|
|
313
|
-
>
|
|
314
|
-
> 2. This project's Python API does not guarantee any compatibility. However, the Python API from pdf2zh will guarantee a certain level of compatibility.
|
|
315
|
-
>
|
|
316
|
-
> 3. We do not provide any technical support for the BabelDOC API.
|
|
317
|
-
>
|
|
318
|
-
> 4. When performing secondary development, please refer to [pdf2zh 2.0 high level](https://github.com/PDFMathTranslate/PDFMathTranslate-next/blob/main/pdf2zh_next/high_level.py) and ensure that BabelDOC runs in a subprocess.
|
|
319
|
-
|
|
320
|
-
You can refer to the example in [main.py](https://github.com/funstory-ai/yadt/blob/main/babeldoc/main.py) to use BabelDOC's Python API.
|
|
321
|
-
|
|
322
|
-
Please note:
|
|
323
|
-
|
|
324
|
-
1. Make sure call `babeldoc.format.pdf.high_level.init()` before using the API
|
|
325
|
-
|
|
326
|
-
2. The current `TranslationConfig` does not fully validate input parameters, so you need to ensure the validity of input parameters
|
|
327
|
-
|
|
328
|
-
3. For offline assets management, you can use the following functions:
|
|
329
|
-
```python
|
|
330
|
-
# Generate an offline assets package
|
|
331
|
-
from pathlib import Path
|
|
332
|
-
import babeldoc.assets.assets
|
|
333
|
-
|
|
334
|
-
# Generate package to a specific directory
|
|
335
|
-
# path is optional, default is ~/.cache/babeldoc/assets/offline_assets_{hash}.zip
|
|
336
|
-
babeldoc.assets.assets.generate_offline_assets_package(Path("/path/to/output/dir"))
|
|
337
|
-
|
|
338
|
-
# Restore from a package file
|
|
339
|
-
# path is optional, default is ~/.cache/babeldoc/assets/offline_assets_{hash}.zip
|
|
340
|
-
babeldoc.assets.assets.restore_offline_assets_package(Path("/path/to/offline_assets_package.zip"))
|
|
341
|
-
|
|
342
|
-
# You can also restore from a directory containing the offline assets package
|
|
343
|
-
# The tool will automatically find the correct package file based on the hash
|
|
344
|
-
babeldoc.assets.assets.restore_offline_assets_package(Path("/path/to/directory"))
|
|
345
|
-
```
|
|
323
|
+
The current recommended way to call BabelDOC in Python is to call the `high_level.do_translate_async_stream` function of [pdf2zh next](https://github.com/PDFMathTranslate/PDFMathTranslate-next).
|
|
346
324
|
|
|
347
|
-
> [!
|
|
348
|
-
>
|
|
349
|
-
> 1. The offline assets package name cannot be modified because the file list hash is encoded in the name.
|
|
350
|
-
> 2. When using in production environments, it's recommended to pre-generate the assets package and include it with your application distribution.
|
|
351
|
-
> 3. The package verification ensures that all required assets are intact and match their expected checksums.
|
|
325
|
+
> [!WARNING]
|
|
326
|
+
> **All APIs of BabelDOC should be considered as internal APIs, and any direct use of BabelDOC is not supported.**
|
|
352
327
|
|
|
353
328
|
## Background
|
|
354
329
|
|
|
@@ -403,6 +378,11 @@ And meet the following requirements:
|
|
|
403
378
|
|
|
404
379
|
This project uses a combination of [Semantic Versioning](https://semver.org/) and [Pride Versioning](https://pridever.org/). The version number format is: "0.MAJOR.MINOR".
|
|
405
380
|
|
|
381
|
+
> [!NOTE]
|
|
382
|
+
>
|
|
383
|
+
> The API compatibility here mainly refers to the compatibility with [pdf2zh_next](https://github.com/PDFMathTranslate/PDFMathTranslate-next).
|
|
384
|
+
|
|
385
|
+
|
|
406
386
|
- MAJOR: Incremented by 1 when API incompatible changes are made or when proud improvements are implemented.
|
|
407
387
|
|
|
408
388
|
- MINOR: Incremented by 1 when any API compatible changes are made.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.0"
|
|
@@ -55,17 +55,6 @@ class DocLayoutModel(abc.ABC):
|
|
|
55
55
|
def stride(self) -> int:
|
|
56
56
|
"""Stride of the model input."""
|
|
57
57
|
|
|
58
|
-
@abc.abstractmethod
|
|
59
|
-
def predict(self, image: bytes, imgsz: int = 1024, **kwargs) -> list[int]:
|
|
60
|
-
"""
|
|
61
|
-
Predict the layout of a document page.
|
|
62
|
-
|
|
63
|
-
Args:
|
|
64
|
-
image: The image of the document page.
|
|
65
|
-
imgsz: Resize the image to this size. Must be a multiple of the stride.
|
|
66
|
-
**kwargs: Additional arguments.
|
|
67
|
-
"""
|
|
68
|
-
|
|
69
58
|
@abc.abstractmethod
|
|
70
59
|
def handle_document(
|
|
71
60
|
self,
|
|
@@ -38,6 +38,8 @@ def encode_image(image) -> bytes:
|
|
|
38
38
|
img = image
|
|
39
39
|
|
|
40
40
|
# logger.debug(f"Image shape: {img.shape}")
|
|
41
|
+
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
|
42
|
+
|
|
41
43
|
encoded = cv2.imencode(".jpg", img)[1].tobytes()
|
|
42
44
|
# logger.debug(f"Encoded image size: {len(encoded)} bytes")
|
|
43
45
|
return encoded
|
|
@@ -38,6 +38,7 @@ def encode_image(image) -> bytes:
|
|
|
38
38
|
else:
|
|
39
39
|
img = image
|
|
40
40
|
|
|
41
|
+
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
|
41
42
|
# logger.debug(f"Image shape: {img.shape}")
|
|
42
43
|
encoded = cv2.imencode(".jpg", img)[1].tobytes()
|
|
43
44
|
# logger.debug(f"Encoded image size: {len(encoded)} bytes")
|
|
@@ -38,6 +38,7 @@ def encode_image(image) -> bytes:
|
|
|
38
38
|
else:
|
|
39
39
|
img = image
|
|
40
40
|
|
|
41
|
+
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
|
41
42
|
# logger.debug(f"Image shape: {img.shape}")
|
|
42
43
|
encoded = cv2.imencode(".jpg", img)[1].tobytes()
|
|
43
44
|
# logger.debug(f"Encoded image size: {len(encoded)} bytes")
|
|
@@ -38,6 +38,7 @@ def encode_image(image) -> bytes:
|
|
|
38
38
|
else:
|
|
39
39
|
img = image
|
|
40
40
|
|
|
41
|
+
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
|
41
42
|
# logger.debug(f"Image shape: {img.shape}")
|
|
42
43
|
encoded = cv2.imencode(".jpg", img)[1].tobytes()
|
|
43
44
|
# logger.debug(f"Encoded image size: {len(encoded)} bytes")
|