BabelDOC 0.5.15__tar.gz → 0.5.17__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.5.15 → babeldoc-0.5.17}/PKG-INFO +3 -3
- {babeldoc-0.5.15 → babeldoc-0.5.17}/README.md +2 -2
- babeldoc-0.5.17/babeldoc/__init__.py +1 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/const.py +1 -1
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/rpc_doclayout6.py +15 -15
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/babelpdf/cidfont.py +6 -3
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/frontend/il_creater.py +73 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +1 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/high_level.py +33 -20
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/translation_config.py +40 -1
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/main.py +1 -1
- babeldoc-0.5.17/babeldoc/utils/memory.py +251 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/CONTRIBUTOR_REWARD.md +2 -1
- {babeldoc-0.5.15 → babeldoc-0.5.17}/pyproject.toml +2 -2
- babeldoc-0.5.15/babeldoc/__init__.py +0 -1
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.cursorignore +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/dependabot.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/labels.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/release-drafter.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/workflows/docs.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/workflows/lint.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/workflows/pr-lint.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/workflows/publish-to-pypi.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.github/workflows/test.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.gitignore +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/LICENSE +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/base_doclayout.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/rpc_doclayout2.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/rpc_doclayout3.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/rpc_doclayout4.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/rpc_doclayout5.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/rpc_doclayout7.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/babelpdf/base14.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/babelpdf/utils.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/babelpdf/win_core.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/converter.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/il_version_1.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/il_version_1.rng +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/il_translator.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/typesetting.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/extract_char.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/formular_helper.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/layout_helper.py +1 -1
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/matrix_helper.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/spatial_analyzer.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/pdfinterp.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/result_merger.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/split_manager.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/glossary.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/LICENSE +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/_saslprep.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/arcfour.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/ascii85.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/casting.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/ccitt.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/README.txt +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/cmapdb.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/converter.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/data_structures.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/encodingdb.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/fontmetrics.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/glyphlist.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/high_level.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/image.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/jbig2.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/latin_enc.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/layout.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/lzw.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdfcolor.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdfdevice.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdfdocument.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdfexceptions.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdffont.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdfinterp.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdfpage.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdfparser.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/pdftypes.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/psexceptions.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/psparser.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/py.typed +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/runlength.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/settings.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/pdfminer/utils.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/translator/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/translator/cache.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/translator/translator.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/utils/__init__.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/README.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/deploy.sh +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/example/demo_glossary.csv +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/index.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/requirements.txt +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/docs/supported_languages.md +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/mkdocs.yml +0 -0
- {babeldoc-0.5.15 → babeldoc-0.5.17}/tests/test_translation_cache_cleanup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BabelDOC
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.17
|
|
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
|
|
@@ -90,7 +90,7 @@ Description-Content-Type: text/markdown
|
|
|
90
90
|
|
|
91
91
|
PDF scientific paper translation and bilingual comparison library.
|
|
92
92
|
|
|
93
|
-
- **Online Service**: Beta version launched [Immersive Translate - BabelDOC](https://app.immersivetranslate.com/babel-doc/)
|
|
93
|
+
- **Online Service**: Beta version launched [Immersive Translate - BabelDOC](https://app.immersivetranslate.com/babel-doc/) Free usage quota is available; please refer to the FAQ section on the page for details.
|
|
94
94
|
- **Self-deployment**: [PDFMathTranslate 2.0](https://github.com/PDFMathTranslate/PDFMathTranslate-next) support for BabelDOC, available for self-deployment + WebUI with more translation services.
|
|
95
95
|
- Provides a simple [command line interface](#getting-started).
|
|
96
96
|
- Provides a [Python API](#python-api).
|
|
@@ -489,4 +489,4 @@ Everyone interacting in YADT and its sub-projects' codebases, issue trackers, ch
|
|
|
489
489
|
> 2. Then, during the scanned document detection phase (`DetectScannedFile` stage):
|
|
490
490
|
> * If the document is identified as heavily scanned (e.g., >80% scanned pages) AND `auto_enable_ocr_workaround` is `true` (i.e., `translation_config.auto_enable_ocr_workaround` is true), the system will then attempt to set both `ocr_workaround` to `true` and `skip_scanned_detection` to `true`.
|
|
491
491
|
>
|
|
492
|
-
> This means that `--auto-enable-ocr-workaround` effectively gives the system control to enable OCR processing for scanned documents, potentially overriding manual settings for `--ocr-workaround` and `--skip_scanned_detection` based on its detection results. If the document is *not* detected as heavily scanned, then the initial `false` values for `ocr_workaround` and `skip_scanned_detection` (forced by `--auto-enable-ocr-workaround` at the `TranslationConfig` initialization stage) will remain in effect unless changed by other logic.
|
|
492
|
+
> This means that `--auto-enable-ocr-workaround` effectively gives the system control to enable OCR processing for scanned documents, potentially overriding manual settings for `--ocr-workaround` and `--skip_scanned_detection` based on its detection results. If the document is *not* detected as heavily scanned, then the initial `false` values for `ocr_workaround` and `skip_scanned_detection` (forced by `--auto-enable-ocr-workaround` at the `TranslationConfig` initialization stage) will remain in effect unless changed by other logic.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
PDF scientific paper translation and bilingual comparison library.
|
|
36
36
|
|
|
37
|
-
- **Online Service**: Beta version launched [Immersive Translate - BabelDOC](https://app.immersivetranslate.com/babel-doc/)
|
|
37
|
+
- **Online Service**: Beta version launched [Immersive Translate - BabelDOC](https://app.immersivetranslate.com/babel-doc/) Free usage quota is available; please refer to the FAQ section on the page for details.
|
|
38
38
|
- **Self-deployment**: [PDFMathTranslate 2.0](https://github.com/PDFMathTranslate/PDFMathTranslate-next) support for BabelDOC, available for self-deployment + WebUI with more translation services.
|
|
39
39
|
- Provides a simple [command line interface](#getting-started).
|
|
40
40
|
- Provides a [Python API](#python-api).
|
|
@@ -433,4 +433,4 @@ Everyone interacting in YADT and its sub-projects' codebases, issue trackers, ch
|
|
|
433
433
|
> 2. Then, during the scanned document detection phase (`DetectScannedFile` stage):
|
|
434
434
|
> * If the document is identified as heavily scanned (e.g., >80% scanned pages) AND `auto_enable_ocr_workaround` is `true` (i.e., `translation_config.auto_enable_ocr_workaround` is true), the system will then attempt to set both `ocr_workaround` to `true` and `skip_scanned_detection` to `true`.
|
|
435
435
|
>
|
|
436
|
-
> This means that `--auto-enable-ocr-workaround` effectively gives the system control to enable OCR processing for scanned documents, potentially overriding manual settings for `--ocr-workaround` and `--skip_scanned_detection` based on its detection results. If the document is *not* detected as heavily scanned, then the initial `false` values for `ocr_workaround` and `skip_scanned_detection` (forced by `--auto-enable-ocr-workaround` at the `TranslationConfig` initialization stage) will remain in effect unless changed by other logic.
|
|
436
|
+
> This means that `--auto-enable-ocr-workaround` effectively gives the system control to enable OCR processing for scanned documents, potentially overriding manual settings for `--ocr-workaround` and `--skip_scanned_detection` based on its detection results. If the document is *not* detected as heavily scanned, then the initial `false` values for `ocr_workaround` and `skip_scanned_detection` (forced by `--auto-enable-ocr-workaround` at the `TranslationConfig` initialization stage) will remain in effect unless changed by other logic.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.17"
|
|
@@ -58,17 +58,6 @@ def encode_image(image) -> bytes:
|
|
|
58
58
|
return encoded
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
@retry(
|
|
62
|
-
stop=stop_after_attempt(3), # 最多重试 3 次
|
|
63
|
-
wait=wait_exponential(
|
|
64
|
-
multiplier=1, min=1, max=10
|
|
65
|
-
), # 指数退避策略,初始 1 秒,最大 10 秒
|
|
66
|
-
retry=retry_if_exception_type((httpx.HTTPError, Exception)), # 针对哪些异常重试
|
|
67
|
-
before_sleep=lambda retry_state: logger.warning(
|
|
68
|
-
f"Request failed, retrying in {getattr(retry_state.next_action, 'sleep', 'unknown')} seconds... "
|
|
69
|
-
f"(Attempt {retry_state.attempt_number}/3)"
|
|
70
|
-
),
|
|
71
|
-
)
|
|
72
61
|
def clip_num(num: float, min_value: float, max_value: float) -> float:
|
|
73
62
|
"""Clip a number to a specified range."""
|
|
74
63
|
if num < min_value:
|
|
@@ -78,6 +67,17 @@ def clip_num(num: float, min_value: float, max_value: float) -> float:
|
|
|
78
67
|
return num
|
|
79
68
|
|
|
80
69
|
|
|
70
|
+
@retry(
|
|
71
|
+
stop=stop_after_attempt(5), # 最多重试 3 次
|
|
72
|
+
wait=wait_exponential(
|
|
73
|
+
multiplier=1, min=1, max=10
|
|
74
|
+
), # 指数退避策略,初始 1 秒,最大 10 秒
|
|
75
|
+
retry=retry_if_exception_type((httpx.HTTPError, Exception)), # 针对哪些异常重试
|
|
76
|
+
before_sleep=lambda retry_state: logger.warning(
|
|
77
|
+
f"Request failed VLM, retrying in {getattr(retry_state.next_action, 'sleep', 'unknown')} seconds... "
|
|
78
|
+
f"(Attempt {retry_state.attempt_number}/5)"
|
|
79
|
+
),
|
|
80
|
+
)
|
|
81
81
|
def predict_layout(
|
|
82
82
|
image,
|
|
83
83
|
host: str = "http://localhost:8000",
|
|
@@ -186,14 +186,14 @@ def predict_layout(
|
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
@retry(
|
|
189
|
-
stop=stop_after_attempt(
|
|
189
|
+
stop=stop_after_attempt(5), # 最多重试 3 次
|
|
190
190
|
wait=wait_exponential(
|
|
191
191
|
multiplier=1, min=1, max=10
|
|
192
192
|
), # 指数退避策略,初始 1 秒,最大 10 秒
|
|
193
193
|
retry=retry_if_exception_type((httpx.HTTPError, Exception)), # 针对哪些异常重试
|
|
194
194
|
before_sleep=lambda retry_state: logger.warning(
|
|
195
|
-
f"Request failed, retrying in {getattr(retry_state.next_action, 'sleep', 'unknown')} seconds... "
|
|
196
|
-
f"(Attempt {retry_state.attempt_number}/
|
|
195
|
+
f"Request failed PADDLE, retrying in {getattr(retry_state.next_action, 'sleep', 'unknown')} seconds... "
|
|
196
|
+
f"(Attempt {retry_state.attempt_number}/5)"
|
|
197
197
|
),
|
|
198
198
|
)
|
|
199
199
|
def predict_layout2(
|
|
@@ -599,7 +599,7 @@ class RpcDocLayoutModel(DocLayoutModel):
|
|
|
599
599
|
):
|
|
600
600
|
layout_temp_path = translate_config.get_working_file_path("layout.temp.pdf")
|
|
601
601
|
mupdf_doc.save(layout_temp_path.as_posix())
|
|
602
|
-
with ThreadPoolExecutor(max_workers=
|
|
602
|
+
with ThreadPoolExecutor(max_workers=32) as executor:
|
|
603
603
|
yield from executor.map(
|
|
604
604
|
self.predict_page,
|
|
605
605
|
pages,
|
|
@@ -41,9 +41,12 @@ def get_descendant_fonts(doc, xref):
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
def get_glyph_bbox(face, g):
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
try:
|
|
45
|
+
face.load_glyph(g, freetype.FT_LOAD_NO_SCALE)
|
|
46
|
+
cbox = face.glyph.outline.get_bbox()
|
|
47
|
+
return cbox.xMin, cbox.yMin, cbox.xMax, cbox.yMax
|
|
48
|
+
except Exception:
|
|
49
|
+
return 0, 0, 0, 0
|
|
47
50
|
|
|
48
51
|
|
|
49
52
|
def get_face_bbox(blob):
|
|
@@ -3,12 +3,14 @@ import functools
|
|
|
3
3
|
import logging
|
|
4
4
|
import math
|
|
5
5
|
import re
|
|
6
|
+
import unicodedata
|
|
6
7
|
from io import BytesIO
|
|
7
8
|
from itertools import islice
|
|
8
9
|
from typing import Literal
|
|
9
10
|
|
|
10
11
|
import freetype
|
|
11
12
|
import pymupdf
|
|
13
|
+
import tiktoken
|
|
12
14
|
|
|
13
15
|
import babeldoc.pdfminer.pdfinterp
|
|
14
16
|
from babeldoc.format.pdf.babelpdf.base14 import get_base14_bbox
|
|
@@ -18,6 +20,7 @@ from babeldoc.format.pdf.babelpdf.encoding import get_type1_encoding
|
|
|
18
20
|
from babeldoc.format.pdf.babelpdf.utils import guarded_bbox
|
|
19
21
|
from babeldoc.format.pdf.document_il import il_version_1
|
|
20
22
|
from babeldoc.format.pdf.document_il.utils import zstd_helper
|
|
23
|
+
from babeldoc.format.pdf.document_il.utils.fontmap import FontMapper
|
|
21
24
|
from babeldoc.format.pdf.document_il.utils.matrix_helper import decompose_ctm
|
|
22
25
|
from babeldoc.format.pdf.document_il.utils.style_helper import BLACK
|
|
23
26
|
from babeldoc.format.pdf.document_il.utils.style_helper import YELLOW
|
|
@@ -358,6 +361,10 @@ class ILCreater:
|
|
|
358
361
|
self.render_order = 0
|
|
359
362
|
self.current_clip_paths: list[tuple] = []
|
|
360
363
|
self.clip_paths_stack: list[list[tuple]] = []
|
|
364
|
+
# For valid character collection
|
|
365
|
+
self.font_mapper = FontMapper(translation_config)
|
|
366
|
+
self.tokenizer = tiktoken.encoding_for_model("gpt-4o")
|
|
367
|
+
self._page_valid_chars_buffer: list[str] | None = None
|
|
361
368
|
|
|
362
369
|
def transform_clip_path(
|
|
363
370
|
self,
|
|
@@ -566,8 +573,32 @@ class ILCreater:
|
|
|
566
573
|
self.current_clip_paths = []
|
|
567
574
|
self.clip_paths_stack = []
|
|
568
575
|
self.docs.page.append(self.current_page)
|
|
576
|
+
# Prepare per-page buffer for valid characters on translated pages
|
|
577
|
+
self._page_valid_chars_buffer = []
|
|
569
578
|
|
|
570
579
|
def on_page_end(self):
|
|
580
|
+
# Accumulate this page's valid characters and tokens into shared context
|
|
581
|
+
try:
|
|
582
|
+
if (
|
|
583
|
+
self._page_valid_chars_buffer is not None
|
|
584
|
+
and len(self._page_valid_chars_buffer) > 0
|
|
585
|
+
):
|
|
586
|
+
page_text = "".join(self._page_valid_chars_buffer)
|
|
587
|
+
char_count = len(page_text)
|
|
588
|
+
try:
|
|
589
|
+
token_count = len(
|
|
590
|
+
self.tokenizer.encode(page_text, disallowed_special=())
|
|
591
|
+
)
|
|
592
|
+
except Exception as e:
|
|
593
|
+
logger.warning("Failed to compute token count for page: %s", e)
|
|
594
|
+
token_count = 0
|
|
595
|
+
self.translation_config.shared_context_cross_split_part.add_valid_counts(
|
|
596
|
+
char_count, token_count
|
|
597
|
+
)
|
|
598
|
+
except Exception as e:
|
|
599
|
+
logger.warning("Failed to accumulate page valid stats: %s", e)
|
|
600
|
+
finally:
|
|
601
|
+
self._page_valid_chars_buffer = []
|
|
571
602
|
self.progress.advance(1)
|
|
572
603
|
|
|
573
604
|
def on_page_crop_box(
|
|
@@ -848,6 +879,11 @@ class ILCreater:
|
|
|
848
879
|
"Failed to get rotation angle for char %s",
|
|
849
880
|
char.get_text(),
|
|
850
881
|
)
|
|
882
|
+
# Collect valid characters for statistics
|
|
883
|
+
try:
|
|
884
|
+
self._collect_valid_char(char.get_text())
|
|
885
|
+
except Exception as e:
|
|
886
|
+
logger.warning("Error collecting valid char: %s", e)
|
|
851
887
|
gs = self.create_graphic_state(char.graphicstate)
|
|
852
888
|
# Get font from current page or xobject
|
|
853
889
|
font = None
|
|
@@ -983,6 +1019,43 @@ class ILCreater:
|
|
|
983
1019
|
)
|
|
984
1020
|
)
|
|
985
1021
|
|
|
1022
|
+
def _collect_valid_char(self, ch: str):
|
|
1023
|
+
"""Append a valid character into the current page buffer according to rules.
|
|
1024
|
+
Rules:
|
|
1025
|
+
- Include whitespace matched by space_regex directly.
|
|
1026
|
+
- Ignore categories that are never normal text: {Cc, Cs, Co, Cn}.
|
|
1027
|
+
- Apply inverted criteria from formular_helper.py (21-28):
|
|
1028
|
+
empty -> invalid, contains '(cid:' -> invalid,
|
|
1029
|
+
not has_char(ch) -> invalid unless len(ch) > 1 and all(has_char(x)).
|
|
1030
|
+
"""
|
|
1031
|
+
if self._page_valid_chars_buffer is None:
|
|
1032
|
+
return
|
|
1033
|
+
if space_regex.match(ch):
|
|
1034
|
+
self._page_valid_chars_buffer.append(ch)
|
|
1035
|
+
return
|
|
1036
|
+
try:
|
|
1037
|
+
cat = unicodedata.category(ch[0]) if ch else None
|
|
1038
|
+
except Exception:
|
|
1039
|
+
cat = None
|
|
1040
|
+
if cat in {"Cc", "Cs", "Co", "Cn"}:
|
|
1041
|
+
return
|
|
1042
|
+
is_invalid = False
|
|
1043
|
+
if not ch:
|
|
1044
|
+
is_invalid = True
|
|
1045
|
+
elif "(cid:" in ch:
|
|
1046
|
+
is_invalid = True
|
|
1047
|
+
else:
|
|
1048
|
+
try:
|
|
1049
|
+
if not self.font_mapper.has_char(ch):
|
|
1050
|
+
if len(ch) > 1 and all(self.font_mapper.has_char(x) for x in ch):
|
|
1051
|
+
is_invalid = False
|
|
1052
|
+
else:
|
|
1053
|
+
is_invalid = True
|
|
1054
|
+
except Exception:
|
|
1055
|
+
is_invalid = True
|
|
1056
|
+
if not is_invalid:
|
|
1057
|
+
self._page_valid_chars_buffer.append(ch)
|
|
1058
|
+
|
|
986
1059
|
def on_lt_curve(self, curve: babeldoc.pdfminer.layout.LTCurve):
|
|
987
1060
|
if not self.enable_graphic_element_process:
|
|
988
1061
|
return
|
{babeldoc-0.5.15 → babeldoc-0.5.17}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py
RENAMED
|
@@ -131,6 +131,7 @@ class DetectScannedFile:
|
|
|
131
131
|
self.translation_config.shared_context_cross_split_part.auto_enabled_ocr_workaround = True
|
|
132
132
|
self.translation_config.ocr_workaround = True
|
|
133
133
|
self.translation_config.skip_scanned_detection = True
|
|
134
|
+
self.translation_config.disable_rich_text_translate = True
|
|
134
135
|
self.clean_render_order_for_chars(docs)
|
|
135
136
|
self.translation_config.remove_non_formula_lines = False
|
|
136
137
|
else:
|
|
@@ -62,6 +62,7 @@ from babeldoc.pdfminer.pdfinterp import PDFResourceManager
|
|
|
62
62
|
from babeldoc.pdfminer.pdfpage import PDFPage
|
|
63
63
|
from babeldoc.pdfminer.pdfparser import PDFParser
|
|
64
64
|
from babeldoc.progress_monitor import ProgressMonitor
|
|
65
|
+
from babeldoc.utils import memory
|
|
65
66
|
|
|
66
67
|
logger = logging.getLogger(__name__)
|
|
67
68
|
|
|
@@ -455,20 +456,10 @@ class MemoryMonitor:
|
|
|
455
456
|
self.peak_memory_usage = 0
|
|
456
457
|
self.monitor_thread = None
|
|
457
458
|
self.stop_event = None
|
|
458
|
-
|
|
459
|
-
try:
|
|
460
|
-
import psutil
|
|
461
|
-
|
|
462
|
-
self.psutil = psutil
|
|
463
|
-
except ImportError:
|
|
464
|
-
logger.warning("psutil not installed, memory monitoring disabled")
|
|
465
|
-
self.psutil = None
|
|
459
|
+
self.last_pss_check_time = None
|
|
466
460
|
|
|
467
461
|
def __enter__(self):
|
|
468
462
|
"""Start memory monitoring."""
|
|
469
|
-
if not self.psutil:
|
|
470
|
-
return self
|
|
471
|
-
|
|
472
463
|
self.stop_event = threading.Event()
|
|
473
464
|
self.monitor_thread = threading.Thread(
|
|
474
465
|
target=self._monitor_memory_usage, daemon=True
|
|
@@ -479,7 +470,7 @@ class MemoryMonitor:
|
|
|
479
470
|
|
|
480
471
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
481
472
|
"""Stop monitoring and log peak memory usage."""
|
|
482
|
-
if not self.
|
|
473
|
+
if not self.monitor_thread:
|
|
483
474
|
return
|
|
484
475
|
|
|
485
476
|
self.stop_event.set()
|
|
@@ -490,14 +481,15 @@ class MemoryMonitor:
|
|
|
490
481
|
"""Background thread that periodically checks memory usage."""
|
|
491
482
|
while not self.stop_event.is_set():
|
|
492
483
|
try:
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
484
|
+
# Use throttled memory check with 2-second PSS throttle
|
|
485
|
+
total_memory, self.last_pss_check_time = (
|
|
486
|
+
memory.get_memory_usage_with_throttle(
|
|
487
|
+
include_children=True,
|
|
488
|
+
prefer_pss=True,
|
|
489
|
+
last_pss_check_time=self.last_pss_check_time,
|
|
490
|
+
pss_throttle_seconds=2.0,
|
|
491
|
+
)
|
|
492
|
+
)
|
|
501
493
|
|
|
502
494
|
# Convert to MB for better readability
|
|
503
495
|
total_memory_mb = total_memory / (1024 * 1024)
|
|
@@ -508,6 +500,10 @@ class MemoryMonitor:
|
|
|
508
500
|
|
|
509
501
|
time.sleep(self.interval)
|
|
510
502
|
|
|
503
|
+
def get_peek_memory_psutil(self):
|
|
504
|
+
"""Get peak memory usage using psutil (for backwards compatibility)."""
|
|
505
|
+
return memory.get_memory_usage_bytes(include_children=True, prefer_pss=True)
|
|
506
|
+
|
|
511
507
|
|
|
512
508
|
def fix_null_page_content(doc: Document) -> list[int]:
|
|
513
509
|
invalid_page = []
|
|
@@ -759,6 +755,23 @@ def do_translate(
|
|
|
759
755
|
logger.info(
|
|
760
756
|
f"finish translate: {original_pdf_path}, cost: {finish_time - start_time} s",
|
|
761
757
|
)
|
|
758
|
+
# Populate aggregate valid text statistics into result
|
|
759
|
+
try:
|
|
760
|
+
sc = translation_config.shared_context_cross_split_part
|
|
761
|
+
result.total_valid_character_count = getattr(
|
|
762
|
+
sc, "valid_char_count_total", 0
|
|
763
|
+
)
|
|
764
|
+
token_total = getattr(sc, "total_valid_text_token_count", None)
|
|
765
|
+
result.total_valid_text_token_count = (
|
|
766
|
+
token_total if isinstance(token_total, int) else 0
|
|
767
|
+
)
|
|
768
|
+
except Exception as e:
|
|
769
|
+
logger.warning("Failed to populate valid text statistics: %s", e)
|
|
770
|
+
try:
|
|
771
|
+
result.total_valid_character_count = 0
|
|
772
|
+
result.total_valid_text_token_count = 0
|
|
773
|
+
except Exception:
|
|
774
|
+
pass
|
|
762
775
|
result.original_pdf_path = translation_config.input_file
|
|
763
776
|
result.peak_memory_usage = peak_memory_usage
|
|
764
777
|
|
|
@@ -32,6 +32,9 @@ class SharedContextCrossSplitPart:
|
|
|
32
32
|
self.auto_extracted_glossary: Glossary | None = None
|
|
33
33
|
self.raw_extracted_terms: list[tuple[str, str]] = []
|
|
34
34
|
self.auto_enabled_ocr_workaround = False
|
|
35
|
+
# Statistics for valid characters/text across the whole file
|
|
36
|
+
self.valid_char_count_total: int = 0
|
|
37
|
+
self.total_valid_text_token_count: int = 0
|
|
35
38
|
|
|
36
39
|
def initialize_glossaries(self, initial_glossaries: list[Glossary] | None):
|
|
37
40
|
with self._lock:
|
|
@@ -45,6 +48,9 @@ class SharedContextCrossSplitPart:
|
|
|
45
48
|
for g in self.user_glossaries:
|
|
46
49
|
for entity in g.normalized_lookup:
|
|
47
50
|
self.norm_terms.add(entity)
|
|
51
|
+
# reset statistics buffer when initializing
|
|
52
|
+
self.valid_char_count_total = 0
|
|
53
|
+
self.total_valid_text_token_count = 0
|
|
48
54
|
|
|
49
55
|
def add_raw_extracted_term_pair(self, src: str, tgt: str):
|
|
50
56
|
with self._lock:
|
|
@@ -67,7 +73,11 @@ class SharedContextCrossSplitPart:
|
|
|
67
73
|
return current_name
|
|
68
74
|
|
|
69
75
|
def contains_term(self, term: str) -> bool:
|
|
70
|
-
|
|
76
|
+
with self._lock:
|
|
77
|
+
try:
|
|
78
|
+
return term in self.norm_terms
|
|
79
|
+
except Exception:
|
|
80
|
+
return False
|
|
71
81
|
|
|
72
82
|
def finalize_auto_extracted_glossary(self):
|
|
73
83
|
with self._lock:
|
|
@@ -112,6 +122,16 @@ class SharedContextCrossSplitPart:
|
|
|
112
122
|
all_glossaries.append(self.auto_extracted_glossary)
|
|
113
123
|
return all_glossaries
|
|
114
124
|
|
|
125
|
+
def add_valid_counts(self, char_count: int, token_count: int):
|
|
126
|
+
"""Accumulate valid character and token counts in a threadsafe way."""
|
|
127
|
+
if char_count <= 0 and token_count <= 0:
|
|
128
|
+
return
|
|
129
|
+
with self._lock:
|
|
130
|
+
if char_count > 0:
|
|
131
|
+
self.valid_char_count_total += char_count
|
|
132
|
+
if token_count > 0:
|
|
133
|
+
self.total_valid_text_token_count += token_count
|
|
134
|
+
|
|
115
135
|
|
|
116
136
|
class TranslationConfig:
|
|
117
137
|
@staticmethod
|
|
@@ -227,6 +247,7 @@ class TranslationConfig:
|
|
|
227
247
|
|
|
228
248
|
if self.ocr_workaround:
|
|
229
249
|
self.skip_scanned_detection = True
|
|
250
|
+
self.disable_rich_text_translate = True
|
|
230
251
|
|
|
231
252
|
# for backward compatibility
|
|
232
253
|
if use_side_by_side_dual is False and use_alternating_pages_dual is False:
|
|
@@ -462,6 +483,8 @@ class TranslateResult:
|
|
|
462
483
|
no_watermark_dual_pdf_path: Path | None
|
|
463
484
|
peak_memory_usage: int | None
|
|
464
485
|
auto_extracted_glossary_path: Path | None
|
|
486
|
+
total_valid_character_count: int | None
|
|
487
|
+
total_valid_text_token_count: int | None
|
|
465
488
|
|
|
466
489
|
def __init__(
|
|
467
490
|
self,
|
|
@@ -478,6 +501,8 @@ class TranslateResult:
|
|
|
478
501
|
self.no_watermark_dual_pdf_path = dual_pdf_path
|
|
479
502
|
|
|
480
503
|
self.auto_extracted_glossary_path = auto_extracted_glossary_path
|
|
504
|
+
self.total_valid_character_count = None
|
|
505
|
+
self.total_valid_text_token_count = None
|
|
481
506
|
|
|
482
507
|
def __str__(self):
|
|
483
508
|
"""Return a human-readable string representation of the translation result."""
|
|
@@ -523,6 +548,20 @@ class TranslateResult:
|
|
|
523
548
|
if hasattr(self, "peak_memory_usage") and self.peak_memory_usage:
|
|
524
549
|
result.append(f"\tPeak memory usage: {self.peak_memory_usage} MB")
|
|
525
550
|
|
|
551
|
+
if hasattr(self, "total_valid_character_count") and isinstance(
|
|
552
|
+
self.total_valid_character_count, int
|
|
553
|
+
):
|
|
554
|
+
result.append(
|
|
555
|
+
f"\tTotal valid character count: {self.total_valid_character_count}"
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
if hasattr(self, "total_valid_text_token_count") and isinstance(
|
|
559
|
+
self.total_valid_text_token_count, int
|
|
560
|
+
):
|
|
561
|
+
result.append(
|
|
562
|
+
f"\tTotal valid text token count (gpt-4o): {self.total_valid_text_token_count}"
|
|
563
|
+
)
|
|
564
|
+
|
|
526
565
|
if result:
|
|
527
566
|
result.insert(0, "Translation results:")
|
|
528
567
|
|