BabelDOC 0.4.18__tar.gz → 0.4.20__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.18 → babeldoc-0.4.20}/PKG-INFO +1 -1
- babeldoc-0.4.20/babeldoc/__init__.py +1 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/const.py +1 -1
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/babelpdf/encoding.py +260 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +3 -1
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/frontend/il_creater.py +38 -5
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/il_version_1.py +22 -22
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +6 -2
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/il_translator.py +58 -22
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +302 -3
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/layout_parser.py +4 -1
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +58 -14
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +6 -8
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/layout_helper.py +14 -20
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/main.py +1 -1
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdffont.py +5 -1
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/translator/cache.py +65 -12
- {babeldoc-0.4.18 → babeldoc-0.4.20}/pyproject.toml +2 -2
- babeldoc-0.4.20/tests/test_translation_cache_cleanup.py +68 -0
- babeldoc-0.4.18/babeldoc/__init__.py +0 -1
- babeldoc-0.4.18/tests/test_translation_config.py +0 -23
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.cursorignore +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/dependabot.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/labels.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/release-drafter.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/docs.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/lint.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/pr-lint.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/publish-to-pypi.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.github/workflows/test.yml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.gitignore +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/LICENSE +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/README.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/base_doclayout.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/rpc_doclayout2.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/rpc_doclayout3.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/rpc_doclayout4.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/babelpdf/base14.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/converter.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/il_version_1.rng +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/midend/typesetting.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/formular_helper.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/high_level.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/pdfinterp.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/result_merger.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/split_manager.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/format/pdf/translation_config.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/glossary.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/LICENSE +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/_saslprep.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/arcfour.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/ascii85.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/casting.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/ccitt.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/README.txt +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/cmapdb.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/converter.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/data_structures.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/encodingdb.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/fontmetrics.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/glyphlist.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/high_level.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/image.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/jbig2.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/latin_enc.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/layout.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/lzw.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfcolor.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfdevice.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfdocument.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfexceptions.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfinterp.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfpage.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdfparser.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/pdftypes.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/psexceptions.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/psparser.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/py.typed +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/runlength.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/settings.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/pdfminer/utils.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/translator/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/translator/translator.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/utils/__init__.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/README.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/deploy.sh +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/example/demo_glossary.csv +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/index.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/requirements.txt +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/docs/supported_languages.md +0 -0
- {babeldoc-0.4.18 → babeldoc-0.4.20}/mkdocs.yml +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.20"
|
|
@@ -1045,3 +1045,263 @@ def get_type1_encoding(name):
|
|
|
1045
1045
|
return win_ansi
|
|
1046
1046
|
case "MacExpertEncoding":
|
|
1047
1047
|
return mac_expert
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
WinAnsiEncoding = [
|
|
1051
|
+
0,
|
|
1052
|
+
1,
|
|
1053
|
+
2,
|
|
1054
|
+
3,
|
|
1055
|
+
4,
|
|
1056
|
+
5,
|
|
1057
|
+
6,
|
|
1058
|
+
7,
|
|
1059
|
+
8,
|
|
1060
|
+
9,
|
|
1061
|
+
10,
|
|
1062
|
+
11,
|
|
1063
|
+
12,
|
|
1064
|
+
13,
|
|
1065
|
+
14,
|
|
1066
|
+
15,
|
|
1067
|
+
16,
|
|
1068
|
+
17,
|
|
1069
|
+
18,
|
|
1070
|
+
19,
|
|
1071
|
+
20,
|
|
1072
|
+
21,
|
|
1073
|
+
22,
|
|
1074
|
+
23,
|
|
1075
|
+
24,
|
|
1076
|
+
25,
|
|
1077
|
+
26,
|
|
1078
|
+
27,
|
|
1079
|
+
28,
|
|
1080
|
+
29,
|
|
1081
|
+
30,
|
|
1082
|
+
31,
|
|
1083
|
+
32,
|
|
1084
|
+
33,
|
|
1085
|
+
34,
|
|
1086
|
+
35,
|
|
1087
|
+
36,
|
|
1088
|
+
37,
|
|
1089
|
+
38,
|
|
1090
|
+
39,
|
|
1091
|
+
40,
|
|
1092
|
+
41,
|
|
1093
|
+
42,
|
|
1094
|
+
43,
|
|
1095
|
+
44,
|
|
1096
|
+
45,
|
|
1097
|
+
46,
|
|
1098
|
+
47,
|
|
1099
|
+
48,
|
|
1100
|
+
49,
|
|
1101
|
+
50,
|
|
1102
|
+
51,
|
|
1103
|
+
52,
|
|
1104
|
+
53,
|
|
1105
|
+
54,
|
|
1106
|
+
55,
|
|
1107
|
+
56,
|
|
1108
|
+
57,
|
|
1109
|
+
58,
|
|
1110
|
+
59,
|
|
1111
|
+
60,
|
|
1112
|
+
61,
|
|
1113
|
+
62,
|
|
1114
|
+
63,
|
|
1115
|
+
64,
|
|
1116
|
+
65,
|
|
1117
|
+
66,
|
|
1118
|
+
67,
|
|
1119
|
+
68,
|
|
1120
|
+
69,
|
|
1121
|
+
70,
|
|
1122
|
+
71,
|
|
1123
|
+
72,
|
|
1124
|
+
73,
|
|
1125
|
+
74,
|
|
1126
|
+
75,
|
|
1127
|
+
76,
|
|
1128
|
+
77,
|
|
1129
|
+
78,
|
|
1130
|
+
79,
|
|
1131
|
+
80,
|
|
1132
|
+
81,
|
|
1133
|
+
82,
|
|
1134
|
+
83,
|
|
1135
|
+
84,
|
|
1136
|
+
85,
|
|
1137
|
+
86,
|
|
1138
|
+
87,
|
|
1139
|
+
88,
|
|
1140
|
+
89,
|
|
1141
|
+
90,
|
|
1142
|
+
91,
|
|
1143
|
+
92,
|
|
1144
|
+
93,
|
|
1145
|
+
94,
|
|
1146
|
+
95,
|
|
1147
|
+
96,
|
|
1148
|
+
97,
|
|
1149
|
+
98,
|
|
1150
|
+
99,
|
|
1151
|
+
100,
|
|
1152
|
+
101,
|
|
1153
|
+
102,
|
|
1154
|
+
103,
|
|
1155
|
+
104,
|
|
1156
|
+
105,
|
|
1157
|
+
106,
|
|
1158
|
+
107,
|
|
1159
|
+
108,
|
|
1160
|
+
109,
|
|
1161
|
+
110,
|
|
1162
|
+
111,
|
|
1163
|
+
112,
|
|
1164
|
+
113,
|
|
1165
|
+
114,
|
|
1166
|
+
115,
|
|
1167
|
+
116,
|
|
1168
|
+
117,
|
|
1169
|
+
118,
|
|
1170
|
+
119,
|
|
1171
|
+
120,
|
|
1172
|
+
121,
|
|
1173
|
+
122,
|
|
1174
|
+
123,
|
|
1175
|
+
124,
|
|
1176
|
+
125,
|
|
1177
|
+
126,
|
|
1178
|
+
127,
|
|
1179
|
+
8364,
|
|
1180
|
+
0,
|
|
1181
|
+
8218,
|
|
1182
|
+
402,
|
|
1183
|
+
8222,
|
|
1184
|
+
8230,
|
|
1185
|
+
8224,
|
|
1186
|
+
8225,
|
|
1187
|
+
710,
|
|
1188
|
+
8240,
|
|
1189
|
+
352,
|
|
1190
|
+
8249,
|
|
1191
|
+
338,
|
|
1192
|
+
0,
|
|
1193
|
+
381,
|
|
1194
|
+
0,
|
|
1195
|
+
0,
|
|
1196
|
+
8216,
|
|
1197
|
+
8217,
|
|
1198
|
+
8220,
|
|
1199
|
+
8221,
|
|
1200
|
+
8226,
|
|
1201
|
+
8211,
|
|
1202
|
+
8212,
|
|
1203
|
+
732,
|
|
1204
|
+
8482,
|
|
1205
|
+
353,
|
|
1206
|
+
8250,
|
|
1207
|
+
339,
|
|
1208
|
+
0,
|
|
1209
|
+
382,
|
|
1210
|
+
376,
|
|
1211
|
+
160,
|
|
1212
|
+
161,
|
|
1213
|
+
162,
|
|
1214
|
+
163,
|
|
1215
|
+
164,
|
|
1216
|
+
165,
|
|
1217
|
+
166,
|
|
1218
|
+
167,
|
|
1219
|
+
168,
|
|
1220
|
+
169,
|
|
1221
|
+
170,
|
|
1222
|
+
171,
|
|
1223
|
+
172,
|
|
1224
|
+
173,
|
|
1225
|
+
174,
|
|
1226
|
+
175,
|
|
1227
|
+
176,
|
|
1228
|
+
177,
|
|
1229
|
+
178,
|
|
1230
|
+
179,
|
|
1231
|
+
180,
|
|
1232
|
+
181,
|
|
1233
|
+
182,
|
|
1234
|
+
183,
|
|
1235
|
+
184,
|
|
1236
|
+
185,
|
|
1237
|
+
186,
|
|
1238
|
+
187,
|
|
1239
|
+
188,
|
|
1240
|
+
189,
|
|
1241
|
+
190,
|
|
1242
|
+
191,
|
|
1243
|
+
192,
|
|
1244
|
+
193,
|
|
1245
|
+
194,
|
|
1246
|
+
195,
|
|
1247
|
+
196,
|
|
1248
|
+
197,
|
|
1249
|
+
198,
|
|
1250
|
+
199,
|
|
1251
|
+
200,
|
|
1252
|
+
201,
|
|
1253
|
+
202,
|
|
1254
|
+
203,
|
|
1255
|
+
204,
|
|
1256
|
+
205,
|
|
1257
|
+
206,
|
|
1258
|
+
207,
|
|
1259
|
+
208,
|
|
1260
|
+
209,
|
|
1261
|
+
210,
|
|
1262
|
+
211,
|
|
1263
|
+
212,
|
|
1264
|
+
213,
|
|
1265
|
+
214,
|
|
1266
|
+
215,
|
|
1267
|
+
216,
|
|
1268
|
+
217,
|
|
1269
|
+
218,
|
|
1270
|
+
219,
|
|
1271
|
+
220,
|
|
1272
|
+
221,
|
|
1273
|
+
222,
|
|
1274
|
+
223,
|
|
1275
|
+
224,
|
|
1276
|
+
225,
|
|
1277
|
+
226,
|
|
1278
|
+
227,
|
|
1279
|
+
228,
|
|
1280
|
+
229,
|
|
1281
|
+
230,
|
|
1282
|
+
231,
|
|
1283
|
+
232,
|
|
1284
|
+
233,
|
|
1285
|
+
234,
|
|
1286
|
+
235,
|
|
1287
|
+
236,
|
|
1288
|
+
237,
|
|
1289
|
+
238,
|
|
1290
|
+
239,
|
|
1291
|
+
240,
|
|
1292
|
+
241,
|
|
1293
|
+
242,
|
|
1294
|
+
243,
|
|
1295
|
+
244,
|
|
1296
|
+
245,
|
|
1297
|
+
246,
|
|
1298
|
+
247,
|
|
1299
|
+
248,
|
|
1300
|
+
249,
|
|
1301
|
+
250,
|
|
1302
|
+
251,
|
|
1303
|
+
252,
|
|
1304
|
+
253,
|
|
1305
|
+
254,
|
|
1306
|
+
255,
|
|
1307
|
+
]
|
|
@@ -795,7 +795,9 @@ class PDFCreater:
|
|
|
795
795
|
logger.debug(f"Error restoring media box {name} from PDF")
|
|
796
796
|
|
|
797
797
|
def write(
|
|
798
|
-
self,
|
|
798
|
+
self,
|
|
799
|
+
translation_config: TranslationConfig,
|
|
800
|
+
check_font_exists: bool = False,
|
|
799
801
|
) -> TranslateResult:
|
|
800
802
|
try:
|
|
801
803
|
basename = Path(translation_config.input_file).stem
|
|
@@ -10,6 +10,7 @@ import freetype
|
|
|
10
10
|
import pymupdf
|
|
11
11
|
|
|
12
12
|
import babeldoc.pdfminer.pdfinterp
|
|
13
|
+
from babeldoc.format.pdf.babelpdf.encoding import WinAnsiEncoding
|
|
13
14
|
from babeldoc.format.pdf.babelpdf.encoding import get_type1_encoding
|
|
14
15
|
from babeldoc.format.pdf.document_il import il_version_1
|
|
15
16
|
from babeldoc.format.pdf.document_il.utils import zstd_helper
|
|
@@ -75,15 +76,22 @@ def get_glyph_cbox(face, g):
|
|
|
75
76
|
return cbox.xMin, cbox.yMin, cbox.xMax, cbox.yMax
|
|
76
77
|
|
|
77
78
|
|
|
79
|
+
def get_char_cbox(face, idx):
|
|
80
|
+
g = face.get_char_index(idx)
|
|
81
|
+
return get_glyph_cbox(face, g)
|
|
82
|
+
|
|
83
|
+
|
|
78
84
|
def get_name_cbox(face, name):
|
|
79
85
|
if name:
|
|
86
|
+
if isinstance(name, str):
|
|
87
|
+
name = name.encode("utf-8")
|
|
80
88
|
g = face.get_name_index(name)
|
|
81
89
|
return get_glyph_cbox(face, g)
|
|
82
90
|
return (0, 0, 0, 0)
|
|
83
91
|
|
|
84
92
|
|
|
85
93
|
def font_encoding_lookup(doc, idx, key):
|
|
86
|
-
obj = doc.xref_get_key(
|
|
94
|
+
obj = doc.xref_get_key(idx, key)
|
|
87
95
|
if obj[0] == "name":
|
|
88
96
|
enc_name = obj[1][1:]
|
|
89
97
|
if enc_vector := get_type1_encoding(enc_name):
|
|
@@ -98,7 +106,7 @@ def parse_font_encoding(doc, idx):
|
|
|
98
106
|
return ("Custom", get_type1_encoding("StandardEncoding"))
|
|
99
107
|
|
|
100
108
|
|
|
101
|
-
def parse_font_file(doc, idx, encoding, differences):
|
|
109
|
+
def parse_font_file(doc, idx, encoding, differences, legacy_encoding):
|
|
102
110
|
bbox_list = []
|
|
103
111
|
data = doc.xref_stream(idx)
|
|
104
112
|
face = freetype.Face(BytesIO(data))
|
|
@@ -111,6 +119,11 @@ def parse_font_file(doc, idx, encoding, differences):
|
|
|
111
119
|
face.select_charmap(charmap.encoding)
|
|
112
120
|
break
|
|
113
121
|
bbox_list = [get_name_cbox(face, x) for x in enc_vector]
|
|
122
|
+
_, legacy_vector = legacy_encoding
|
|
123
|
+
legacy_bbox_list = [get_char_cbox(face, x) for x in legacy_vector]
|
|
124
|
+
for i, bbox in enumerate(bbox_list):
|
|
125
|
+
if sum(bbox) == 0:
|
|
126
|
+
bbox_list[i] = legacy_bbox_list[i]
|
|
114
127
|
if differences:
|
|
115
128
|
for code, name in differences:
|
|
116
129
|
bbox_list[code] = get_name_cbox(face, name.encode("U8"))
|
|
@@ -525,14 +538,28 @@ class ILCreater:
|
|
|
525
538
|
self.current_page_font_char_bounding_box_map[font_id] = (
|
|
526
539
|
font_char_bounding_box_map
|
|
527
540
|
)
|
|
528
|
-
except Exception:
|
|
529
|
-
|
|
541
|
+
except Exception as e:
|
|
542
|
+
logger.error("failed to parse font xobj id %d: %s", xref_id, e)
|
|
530
543
|
self.current_page_font_name_id_map[xref_id] = font_id
|
|
531
544
|
if self.xobj_id in self.xobj_map:
|
|
532
545
|
self.xobj_map[self.xobj_id].pdf_font.append(il_font_metadata)
|
|
533
546
|
else:
|
|
534
547
|
self.current_page.pdf_font.append(il_font_metadata)
|
|
535
548
|
|
|
549
|
+
def get_legacy_encoding(self, xobj_id):
|
|
550
|
+
try:
|
|
551
|
+
encoding = ("Custom", list(range(256)))
|
|
552
|
+
font_encoding = self.mupdf.xref_get_key(xobj_id, "Encoding")
|
|
553
|
+
if font_encoding[1] == "/WinAnsiEncoding":
|
|
554
|
+
encoding = ("WinAnsi", WinAnsiEncoding)
|
|
555
|
+
base_encoding = self.mupdf.xref_get_key(xobj_id, "Encoding/BaseEncoding")
|
|
556
|
+
if base_encoding[1] == "/WinAnsiEncoding":
|
|
557
|
+
encoding = ("WinAnsi", WinAnsiEncoding)
|
|
558
|
+
|
|
559
|
+
return encoding
|
|
560
|
+
except Exception:
|
|
561
|
+
return ("Custom", list(range(256)))
|
|
562
|
+
|
|
536
563
|
def parse_font_xobj_id(self, xobj_id: int):
|
|
537
564
|
bbox_list = []
|
|
538
565
|
encoding = parse_font_encoding(self.mupdf, xobj_id)
|
|
@@ -543,7 +570,13 @@ class ILCreater:
|
|
|
543
570
|
for file_key in ["FontFile", "FontFile2", "FontFile3"]:
|
|
544
571
|
font_file = self.mupdf.xref_get_key(xobj_id, f"FontDescriptor/{file_key}")
|
|
545
572
|
if file_idx := indirect(font_file):
|
|
546
|
-
bbox_list = parse_font_file(
|
|
573
|
+
bbox_list = parse_font_file(
|
|
574
|
+
self.mupdf,
|
|
575
|
+
file_idx,
|
|
576
|
+
encoding,
|
|
577
|
+
differences,
|
|
578
|
+
self.get_legacy_encoding(xobj_id),
|
|
579
|
+
)
|
|
547
580
|
cmap = {}
|
|
548
581
|
to_unicode = self.mupdf.xref_get_key(xobj_id, "ToUnicode")
|
|
549
582
|
if to_unicode_idx := indirect(to_unicode):
|
|
@@ -2,7 +2,7 @@ from dataclasses import dataclass
|
|
|
2
2
|
from dataclasses import field
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
@dataclass
|
|
5
|
+
@dataclass(slots=True)
|
|
6
6
|
class BaseOperations:
|
|
7
7
|
class Meta:
|
|
8
8
|
name = "baseOperations"
|
|
@@ -15,7 +15,7 @@ class BaseOperations:
|
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
@dataclass
|
|
18
|
+
@dataclass(slots=True)
|
|
19
19
|
class Box:
|
|
20
20
|
class Meta:
|
|
21
21
|
name = "box"
|
|
@@ -50,7 +50,7 @@ class Box:
|
|
|
50
50
|
)
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
@dataclass
|
|
53
|
+
@dataclass(slots=True)
|
|
54
54
|
class GraphicState:
|
|
55
55
|
class Meta:
|
|
56
56
|
name = "graphicState"
|
|
@@ -138,7 +138,7 @@ class GraphicState:
|
|
|
138
138
|
)
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
@dataclass
|
|
141
|
+
@dataclass(slots=True)
|
|
142
142
|
class PdfFontCharBoundingBox:
|
|
143
143
|
class Meta:
|
|
144
144
|
name = "pdfFontCharBoundingBox"
|
|
@@ -180,7 +180,7 @@ class PdfFontCharBoundingBox:
|
|
|
180
180
|
)
|
|
181
181
|
|
|
182
182
|
|
|
183
|
-
@dataclass
|
|
183
|
+
@dataclass(slots=True)
|
|
184
184
|
class Cropbox:
|
|
185
185
|
class Meta:
|
|
186
186
|
name = "cropbox"
|
|
@@ -194,7 +194,7 @@ class Cropbox:
|
|
|
194
194
|
)
|
|
195
195
|
|
|
196
196
|
|
|
197
|
-
@dataclass
|
|
197
|
+
@dataclass(slots=True)
|
|
198
198
|
class Mediabox:
|
|
199
199
|
class Meta:
|
|
200
200
|
name = "mediabox"
|
|
@@ -208,7 +208,7 @@ class Mediabox:
|
|
|
208
208
|
)
|
|
209
209
|
|
|
210
210
|
|
|
211
|
-
@dataclass
|
|
211
|
+
@dataclass(slots=True)
|
|
212
212
|
class PageLayout:
|
|
213
213
|
class Meta:
|
|
214
214
|
name = "pageLayout"
|
|
@@ -243,7 +243,7 @@ class PageLayout:
|
|
|
243
243
|
)
|
|
244
244
|
|
|
245
245
|
|
|
246
|
-
@dataclass
|
|
246
|
+
@dataclass(slots=True)
|
|
247
247
|
class PdfFigure:
|
|
248
248
|
class Meta:
|
|
249
249
|
name = "pdfFigure"
|
|
@@ -257,7 +257,7 @@ class PdfFigure:
|
|
|
257
257
|
)
|
|
258
258
|
|
|
259
259
|
|
|
260
|
-
@dataclass
|
|
260
|
+
@dataclass(slots=True)
|
|
261
261
|
class PdfFont:
|
|
262
262
|
class Meta:
|
|
263
263
|
name = "pdfFont"
|
|
@@ -338,7 +338,7 @@ class PdfFont:
|
|
|
338
338
|
)
|
|
339
339
|
|
|
340
340
|
|
|
341
|
-
@dataclass
|
|
341
|
+
@dataclass(slots=True)
|
|
342
342
|
class PdfRectangle:
|
|
343
343
|
class Meta:
|
|
344
344
|
name = "pdfRectangle"
|
|
@@ -386,7 +386,7 @@ class PdfRectangle:
|
|
|
386
386
|
)
|
|
387
387
|
|
|
388
388
|
|
|
389
|
-
@dataclass
|
|
389
|
+
@dataclass(slots=True)
|
|
390
390
|
class PdfStyle:
|
|
391
391
|
class Meta:
|
|
392
392
|
name = "pdfStyle"
|
|
@@ -415,7 +415,7 @@ class PdfStyle:
|
|
|
415
415
|
)
|
|
416
416
|
|
|
417
417
|
|
|
418
|
-
@dataclass
|
|
418
|
+
@dataclass(slots=True)
|
|
419
419
|
class VisualBbox:
|
|
420
420
|
class Meta:
|
|
421
421
|
name = "visual_bbox"
|
|
@@ -429,7 +429,7 @@ class VisualBbox:
|
|
|
429
429
|
)
|
|
430
430
|
|
|
431
431
|
|
|
432
|
-
@dataclass
|
|
432
|
+
@dataclass(slots=True)
|
|
433
433
|
class PdfCharacter:
|
|
434
434
|
class Meta:
|
|
435
435
|
name = "pdfCharacter"
|
|
@@ -508,7 +508,7 @@ class PdfCharacter:
|
|
|
508
508
|
)
|
|
509
509
|
|
|
510
510
|
|
|
511
|
-
@dataclass
|
|
511
|
+
@dataclass(slots=True)
|
|
512
512
|
class PdfSameStyleUnicodeCharacters:
|
|
513
513
|
class Meta:
|
|
514
514
|
name = "pdfSameStyleUnicodeCharacters"
|
|
@@ -535,7 +535,7 @@ class PdfSameStyleUnicodeCharacters:
|
|
|
535
535
|
)
|
|
536
536
|
|
|
537
537
|
|
|
538
|
-
@dataclass
|
|
538
|
+
@dataclass(slots=True)
|
|
539
539
|
class PdfXobject:
|
|
540
540
|
class Meta:
|
|
541
541
|
name = "pdfXobject"
|
|
@@ -580,7 +580,7 @@ class PdfXobject:
|
|
|
580
580
|
)
|
|
581
581
|
|
|
582
582
|
|
|
583
|
-
@dataclass
|
|
583
|
+
@dataclass(slots=True)
|
|
584
584
|
class PdfFormula:
|
|
585
585
|
class Meta:
|
|
586
586
|
name = "pdfFormula"
|
|
@@ -622,7 +622,7 @@ class PdfFormula:
|
|
|
622
622
|
)
|
|
623
623
|
|
|
624
624
|
|
|
625
|
-
@dataclass
|
|
625
|
+
@dataclass(slots=True)
|
|
626
626
|
class PdfLine:
|
|
627
627
|
class Meta:
|
|
628
628
|
name = "pdfLine"
|
|
@@ -644,7 +644,7 @@ class PdfLine:
|
|
|
644
644
|
)
|
|
645
645
|
|
|
646
646
|
|
|
647
|
-
@dataclass
|
|
647
|
+
@dataclass(slots=True)
|
|
648
648
|
class PdfSameStyleCharacters:
|
|
649
649
|
class Meta:
|
|
650
650
|
name = "pdfSameStyleCharacters"
|
|
@@ -674,7 +674,7 @@ class PdfSameStyleCharacters:
|
|
|
674
674
|
)
|
|
675
675
|
|
|
676
676
|
|
|
677
|
-
@dataclass
|
|
677
|
+
@dataclass(slots=True)
|
|
678
678
|
class PdfParagraphComposition:
|
|
679
679
|
class Meta:
|
|
680
680
|
name = "pdfParagraphComposition"
|
|
@@ -716,7 +716,7 @@ class PdfParagraphComposition:
|
|
|
716
716
|
)
|
|
717
717
|
|
|
718
718
|
|
|
719
|
-
@dataclass
|
|
719
|
+
@dataclass(slots=True)
|
|
720
720
|
class PdfParagraph:
|
|
721
721
|
class Meta:
|
|
722
722
|
name = "pdfParagraph"
|
|
@@ -802,7 +802,7 @@ class PdfParagraph:
|
|
|
802
802
|
)
|
|
803
803
|
|
|
804
804
|
|
|
805
|
-
@dataclass
|
|
805
|
+
@dataclass(slots=True)
|
|
806
806
|
class Page:
|
|
807
807
|
class Meta:
|
|
808
808
|
name = "page"
|
|
@@ -896,7 +896,7 @@ class Page:
|
|
|
896
896
|
)
|
|
897
897
|
|
|
898
898
|
|
|
899
|
-
@dataclass
|
|
899
|
+
@dataclass(slots=True)
|
|
900
900
|
class Document:
|
|
901
901
|
class Meta:
|
|
902
902
|
name = "document"
|
|
@@ -46,7 +46,9 @@ Result:
|
|
|
46
46
|
|
|
47
47
|
class BatchParagraph:
|
|
48
48
|
def __init__(
|
|
49
|
-
self,
|
|
49
|
+
self,
|
|
50
|
+
paragraphs: list[PdfParagraph],
|
|
51
|
+
page_tracker: PageTermExtractTracker,
|
|
50
52
|
):
|
|
51
53
|
self.paragraphs = paragraphs
|
|
52
54
|
self.tracker = page_tracker.new_paragraph()
|
|
@@ -105,7 +107,9 @@ class AutomaticTermExtractor:
|
|
|
105
107
|
stage_name = "Automatic Term Extraction"
|
|
106
108
|
|
|
107
109
|
def __init__(
|
|
108
|
-
self,
|
|
110
|
+
self,
|
|
111
|
+
translate_engine: BaseTranslator,
|
|
112
|
+
translation_config: TranslationConfig,
|
|
109
113
|
):
|
|
110
114
|
self.translate_engine = translate_engine
|
|
111
115
|
self.translation_config = translation_config
|
|
@@ -81,36 +81,67 @@ class PbarContext:
|
|
|
81
81
|
class DocumentTranslateTracker:
|
|
82
82
|
def __init__(self):
|
|
83
83
|
self.page = []
|
|
84
|
+
self.cross_page = []
|
|
85
|
+
# Track paragraphs that are combined due to cross-column detection within the same page
|
|
86
|
+
self.cross_column = []
|
|
84
87
|
|
|
85
88
|
def new_page(self):
|
|
86
89
|
page = PageTranslateTracker()
|
|
87
90
|
self.page.append(page)
|
|
88
91
|
return page
|
|
89
92
|
|
|
93
|
+
def new_cross_page(self):
|
|
94
|
+
page = PageTranslateTracker()
|
|
95
|
+
self.cross_page.append(page)
|
|
96
|
+
return page
|
|
97
|
+
|
|
98
|
+
def new_cross_column(self):
|
|
99
|
+
"""Create and return a new PageTranslateTracker dedicated to cross-column merging."""
|
|
100
|
+
page = PageTranslateTracker()
|
|
101
|
+
self.cross_column.append(page)
|
|
102
|
+
return page
|
|
103
|
+
|
|
90
104
|
def to_json(self):
|
|
91
105
|
pages = []
|
|
92
106
|
for page in self.page:
|
|
93
|
-
paragraphs =
|
|
94
|
-
for para in page.paragraph:
|
|
95
|
-
i_str = getattr(para, "input", None)
|
|
96
|
-
o_str = getattr(para, "output", None)
|
|
97
|
-
pdf_unicode = getattr(para, "pdf_unicode", None)
|
|
98
|
-
llm_translate_trackers = getattr(para, "llm_translate_trackers", None)
|
|
99
|
-
llm_translate_trackers_json = []
|
|
100
|
-
for tracker in llm_translate_trackers:
|
|
101
|
-
llm_translate_trackers_json.append(tracker.to_dict())
|
|
102
|
-
if pdf_unicode is None or i_str is None:
|
|
103
|
-
continue
|
|
104
|
-
paragraphs.append(
|
|
105
|
-
{
|
|
106
|
-
"input": i_str,
|
|
107
|
-
"output": o_str,
|
|
108
|
-
"pdf_unicode": pdf_unicode,
|
|
109
|
-
"llm_translate_trackers": llm_translate_trackers_json,
|
|
110
|
-
},
|
|
111
|
-
)
|
|
107
|
+
paragraphs = self.convert_paragraph(page)
|
|
112
108
|
pages.append({"paragraph": paragraphs})
|
|
113
|
-
|
|
109
|
+
cross_page = []
|
|
110
|
+
for page in self.cross_page:
|
|
111
|
+
paragraphs = self.convert_paragraph(page)
|
|
112
|
+
cross_page.append({"paragraph": paragraphs})
|
|
113
|
+
cross_column = []
|
|
114
|
+
for page in self.cross_column:
|
|
115
|
+
paragraphs = self.convert_paragraph(page)
|
|
116
|
+
cross_column.append({"paragraph": paragraphs})
|
|
117
|
+
return json.dumps(
|
|
118
|
+
{"cross_page": cross_page, "cross_column": cross_column, "page": pages},
|
|
119
|
+
ensure_ascii=False,
|
|
120
|
+
indent=2,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
def convert_paragraph(self, page):
|
|
124
|
+
paragraphs = []
|
|
125
|
+
for para in page.paragraph:
|
|
126
|
+
i_str = getattr(para, "input", None)
|
|
127
|
+
o_str = getattr(para, "output", None)
|
|
128
|
+
pdf_unicode = getattr(para, "pdf_unicode", None)
|
|
129
|
+
llm_translate_trackers = getattr(para, "llm_translate_trackers", None)
|
|
130
|
+
llm_translate_trackers_json = []
|
|
131
|
+
for tracker in llm_translate_trackers:
|
|
132
|
+
llm_translate_trackers_json.append(tracker.to_dict())
|
|
133
|
+
if pdf_unicode is None or i_str is None:
|
|
134
|
+
continue
|
|
135
|
+
paragraph_json = {
|
|
136
|
+
"input": i_str,
|
|
137
|
+
"output": o_str,
|
|
138
|
+
"pdf_unicode": pdf_unicode,
|
|
139
|
+
"llm_translate_trackers": llm_translate_trackers_json,
|
|
140
|
+
}
|
|
141
|
+
paragraphs.append(
|
|
142
|
+
paragraph_json,
|
|
143
|
+
)
|
|
144
|
+
return paragraphs
|
|
114
145
|
|
|
115
146
|
|
|
116
147
|
class PageTranslateTracker:
|
|
@@ -752,7 +783,9 @@ class ILTranslator:
|
|
|
752
783
|
return False
|
|
753
784
|
paragraph.unicode = translated_text
|
|
754
785
|
paragraph.pdf_paragraph_composition = self.parse_translate_output(
|
|
755
|
-
translate_input,
|
|
786
|
+
translate_input,
|
|
787
|
+
translated_text,
|
|
788
|
+
tracker.last_llm_translate_tracker(),
|
|
756
789
|
)
|
|
757
790
|
for composition in paragraph.pdf_paragraph_composition:
|
|
758
791
|
if (
|
|
@@ -910,7 +943,10 @@ Now, please carefully read the following text to be translated and directly outp
|
|
|
910
943
|
# Perform translation
|
|
911
944
|
if self.support_llm_translate:
|
|
912
945
|
llm_prompt = self.generate_prompt_for_llm(
|
|
913
|
-
text,
|
|
946
|
+
text,
|
|
947
|
+
title_paragraph,
|
|
948
|
+
local_title_paragraph,
|
|
949
|
+
translate_input,
|
|
914
950
|
)
|
|
915
951
|
llm_translate_tracker.set_input(llm_prompt)
|
|
916
952
|
translated_text = self.translate_engine.llm_translate(
|