BabelDOC 0.5.24__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/workflows/publish-to-pypi.yml +24 -1
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.gitignore +5 -4
- {babeldoc-0.5.24 → babeldoc-0.6.0}/PKG-INFO +1 -2
- babeldoc-0.6.0/babeldoc/__init__.py +1 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/assets/assets.py +19 -34
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/assets/embedding_assets_metadata.py +0 -10
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/const.py +1 -1
- babeldoc-0.6.0/babeldoc/docvision/rpc_doclayout8.py +361 -0
- babeldoc-0.6.0/babeldoc/docvision/table_detection/rapidocr.py +41 -0
- babeldoc-0.6.0/babeldoc/format/pdf/awlt_char.py +76 -0
- babeldoc-0.6.0/babeldoc/format/pdf/babelpdf/utils.py +22 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/converter.py +3 -75
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/__init__.py +2 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +166 -23
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/frontend/il_creater.py +19 -14
- babeldoc-0.6.0/babeldoc/format/pdf/document_il/frontend/il_creater_active.py +1574 -0
- babeldoc-0.6.0/babeldoc/format/pdf/document_il/frontend/il_creater_active_support.py +566 -0
- babeldoc-0.6.0/babeldoc/format/pdf/document_il/frontend/inline_image_params.py +54 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/il_version_1.py +35 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/il_version_1.rnc +1 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/il_version_1.rng +5 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/il_version_1.xsd +1 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/extract_char.py +7 -4
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/xml_converter.py +10 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/high_level.py +10 -141
- babeldoc-0.6.0/babeldoc/format/pdf/legacy_parse.py +142 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/__init__.py +1 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/active_direct_font_backend.py +605 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/active_font_backend.py +23 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/active_font_resource_runtime.py +43 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/active_font_runtime.py +116 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/active_object_backend.py +14 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/active_object_projection.py +78 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/active_parse_runtime.py +27 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/active_value_access.py +59 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/base_operations.py +107 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/bridge_types.py +154 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/compat/__init__.py +1 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/font_spec_primitives.py +45 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/font_types.py +29 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/glyphs.py +204 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/interpreter.py +854 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/native_page_execution_session.py +49 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/native_page_interpreter.py +66 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/native_parse.py +166 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/object_model.py +37 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/object_parser.py +117 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/page_api.py +31 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/page_content_access.py +27 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/page_content_execution.py +23 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/page_execution_session.py +53 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/page_interpreter.py +13 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/pdf_token_serializer.py +114 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/prepared_page.py +79 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/prepared_page_access.py +42 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/prepared_page_debug_access.py +36 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/prepared_page_execution.py +31 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/prepared_resource_builder.py +222 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/pymupdf_candidate_parse.py +36 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/pymupdf_object_access.py +161 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/pymupdf_page_execution_session.py +7 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/pymupdf_page_view_access.py +73 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/pymupdf_prepared_page_access.py +38 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/raw_page_view.py +27 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/resolved_object_access.py +65 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/resource_runtime_types.py +13 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/resources.py +131 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/__init__.py +1 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/cid_cmap_runtime.py +125 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/cmap_types_runtime.py +155 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/data/glyphlist.py +4370 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/exceptions_runtime.py +18 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/font_data_runtime.py +109 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/font_encoding_runtime.py +117 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/font_unicode_maps.py +21 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/font_widths.py +55 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/object_primitives_runtime.py +106 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/object_stream_runtime.py +30 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/ps_primitives_runtime.py +65 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/to_unicode_parser_runtime.py +176 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/sinks/legacy_ir.py +395 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/sinks/native_text.py +259 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/state.py +215 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/text_positioning.py +101 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/tokenizer.py +681 -0
- babeldoc-0.6.0/babeldoc/format/pdf/new_parser/xobject_content_execution.py +109 -0
- babeldoc-0.6.0/babeldoc/format/pdf/parse_only.py +120 -0
- babeldoc-0.6.0/babeldoc/format/pdf/parse_shared.py +63 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/pdfinterp.py +38 -2
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/translation_config.py +6 -3
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/main.py +1 -1
- babeldoc-0.6.0/babeldoc/pdfminer/fontmetrics.py +4464 -0
- babeldoc-0.6.0/babeldoc/pdfminer/latin_enc.py +244 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/lzw.py +10 -2
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/psparser.py +0 -0
- babeldoc-0.6.0/babeldoc/pdfminer/settings.py +1 -0
- babeldoc-0.6.0/babeldoc/tools/executor/__main__.py +4 -0
- babeldoc-0.6.0/babeldoc/tools/executor/babeldoc_adapter.py +475 -0
- babeldoc-0.6.0/babeldoc/tools/executor/protocol.py +35 -0
- babeldoc-0.6.0/babeldoc/tools/executor/runner.py +417 -0
- babeldoc-0.6.0/babeldoc/tools/executor/server.py +468 -0
- babeldoc-0.6.0/babeldoc/tools/executor/state.py +319 -0
- babeldoc-0.6.0/babeldoc/tools/executor/translator.py +164 -0
- babeldoc-0.6.0/babeldoc/tools/executor/watermark_transform.py +175 -0
- babeldoc-0.6.0/babeldoc/tools/executor/workroot.py +61 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/tools/generate_font_metadata.py +4 -2
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/translator/translator.py +1 -1
- babeldoc-0.6.0/babeldoc/utils/__init__.py +0 -0
- babeldoc-0.6.0/docs/release-notes/v0.6.0.md +45 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/mkdocs.yml +3 -1
- {babeldoc-0.5.24 → babeldoc-0.6.0}/pyproject.toml +4 -4
- babeldoc-0.5.24/babeldoc/__init__.py +0 -1
- babeldoc-0.5.24/babeldoc/docvision/table_detection/rapidocr.py +0 -321
- babeldoc-0.5.24/babeldoc/format/pdf/babelpdf/utils.py +0 -14
- babeldoc-0.5.24/tests/test_translation_cache_cleanup.py +0 -68
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/dependabot.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/labels.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/release-drafter.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/workflows/docs.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/workflows/lint.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/workflows/pr-lint.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.github/workflows/test.yml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/LICENSE +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/README.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/babeldoc_exception/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/base_doclayout.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/doclayout.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/rpc_doclayout2.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/rpc_doclayout3.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/rpc_doclayout4.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/rpc_doclayout5.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/rpc_doclayout6.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/docvision/rpc_doclayout7.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/babelpdf/base14.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/babelpdf/cidfont.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/babelpdf/cmap.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/babelpdf/type3.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/babelpdf/win_core.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/il_translator.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/midend/typesetting.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/formular_helper.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/matrix_helper.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/spatial_analyzer.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
- {babeldoc-0.5.24/babeldoc/pdfminer → babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/data}/fontmetrics.py +0 -0
- {babeldoc-0.5.24/babeldoc/pdfminer → babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/data}/latin_enc.py +0 -0
- /babeldoc-0.5.24/babeldoc/pdfminer/settings.py → /babeldoc-0.6.0/babeldoc/format/pdf/new_parser/runtime/runtime_settings.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/result_merger.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/format/pdf/split_manager.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/glossary.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/LICENSE +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/_saslprep.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/arcfour.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/ascii85.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/casting.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/ccitt.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/README.txt +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/cmapdb.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/converter.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/data_structures.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/encodingdb.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/glyphlist.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/high_level.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/image.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/jbig2.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/layout.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdfcolor.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdfdevice.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdfdocument.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdfexceptions.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdffont.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdfinterp.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdfpage.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdfparser.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/pdftypes.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/psexceptions.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/py.typed +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/runlength.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/pdfminer/utils.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.5.24/babeldoc/translator → babeldoc-0.6.0/babeldoc/tools/executor}/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/tools/generate_cmap_metadata.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/tools/italic_assistance.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/tools/italic_recognize_tool.py +0 -0
- {babeldoc-0.5.24/babeldoc/utils → babeldoc-0.6.0/babeldoc/translator}/__init__.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/translator/cache.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/utils/atomic_integer.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/utils/memory.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/README.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/deploy.sh +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/example/demo_glossary.csv +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/index.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/requirements.txt +0 -0
- {babeldoc-0.5.24 → babeldoc-0.6.0}/docs/supported_languages.md +0 -0
|
@@ -55,6 +55,11 @@ jobs:
|
|
|
55
55
|
version-command: |
|
|
56
56
|
cat pyproject.toml | grep "version = " | head -n 1 | awk -F'"' '{print $2}'
|
|
57
57
|
|
|
58
|
+
- name: Check manual release notes
|
|
59
|
+
if: steps.check-version.outputs.tag
|
|
60
|
+
run: |
|
|
61
|
+
test -f "docs/release-notes/${{ steps.check-version.outputs.tag }}.md"
|
|
62
|
+
|
|
58
63
|
- name: Install Dependencies
|
|
59
64
|
run: |
|
|
60
65
|
uv sync
|
|
@@ -151,4 +156,22 @@ jobs:
|
|
|
151
156
|
publish: ${{ needs.build.outputs.is_release != '' }}
|
|
152
157
|
tag: ${{ needs.build.outputs.is_release }}
|
|
153
158
|
env:
|
|
154
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
159
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
160
|
+
|
|
161
|
+
- name: Prepend manual release notes
|
|
162
|
+
if: needs.build.outputs.is_release != ''
|
|
163
|
+
env:
|
|
164
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
165
|
+
TAG: ${{ needs.build.outputs.is_release }}
|
|
166
|
+
run: |
|
|
167
|
+
set -euo pipefail
|
|
168
|
+
notes_path="docs/release-notes/${TAG}.md"
|
|
169
|
+
current_body="$(mktemp)"
|
|
170
|
+
combined_body="$(mktemp)"
|
|
171
|
+
gh release view "${TAG}" --json body --jq .body > "${current_body}"
|
|
172
|
+
{
|
|
173
|
+
cat "${notes_path}"
|
|
174
|
+
printf '\n\n---\n\n'
|
|
175
|
+
cat "${current_body}"
|
|
176
|
+
} > "${combined_body}"
|
|
177
|
+
gh release edit "${TAG}" --notes-file "${combined_body}"
|
|
@@ -25,7 +25,9 @@ memray*
|
|
|
25
25
|
.vscode
|
|
26
26
|
__pycache__
|
|
27
27
|
.ruff_cache
|
|
28
|
+
.tmp
|
|
28
29
|
yadt.toml
|
|
30
|
+
yadt.toml*
|
|
29
31
|
examples/
|
|
30
32
|
/make_gif.py
|
|
31
33
|
/dist
|
|
@@ -41,10 +43,9 @@ babeldoc/format/txt
|
|
|
41
43
|
# uv
|
|
42
44
|
uv.lock
|
|
43
45
|
|
|
44
|
-
# Claude Code memory file
|
|
45
|
-
CLAUDE.md
|
|
46
46
|
/.claude
|
|
47
47
|
babeldoc/format/playground
|
|
48
48
|
temp.jpg
|
|
49
|
-
|
|
50
|
-
.
|
|
49
|
+
.serena
|
|
50
|
+
.codex
|
|
51
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BabelDOC
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Yet Another Document Translator
|
|
5
5
|
Project-URL: Homepage, https://github.com/funstory-ai/BabelDOC
|
|
6
6
|
Project-URL: Issues, https://github.com/funstory-ai/BabelDOC/issues
|
|
@@ -34,7 +34,6 @@ Requires-Dist: psutil>=7.0.0
|
|
|
34
34
|
Requires-Dist: pydantic>=2.10.6
|
|
35
35
|
Requires-Dist: pymupdf>=1.25.1
|
|
36
36
|
Requires-Dist: pyzstd>=0.17.0
|
|
37
|
-
Requires-Dist: rapidocr-onnxruntime>=1.4.4
|
|
38
37
|
Requires-Dist: rich>=13.9.4
|
|
39
38
|
Requires-Dist: rtree>=1.4.0
|
|
40
39
|
Requires-Dist: scikit-image>=0.25.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.0"
|
|
@@ -17,10 +17,6 @@ from babeldoc.assets.embedding_assets_metadata import (
|
|
|
17
17
|
from babeldoc.assets.embedding_assets_metadata import EMBEDDING_FONT_METADATA
|
|
18
18
|
from babeldoc.assets.embedding_assets_metadata import FONT_METADATA_URL
|
|
19
19
|
from babeldoc.assets.embedding_assets_metadata import FONT_URL_BY_UPSTREAM
|
|
20
|
-
from babeldoc.assets.embedding_assets_metadata import (
|
|
21
|
-
TABLE_DETECTION_RAPIDOCR_MODEL_SHA3_256,
|
|
22
|
-
)
|
|
23
|
-
from babeldoc.assets.embedding_assets_metadata import TABLE_DETECTION_RAPIDOCR_MODEL_URL
|
|
24
20
|
from babeldoc.assets.embedding_assets_metadata import TIKTOKEN_CACHES
|
|
25
21
|
from babeldoc.const import get_cache_file_path
|
|
26
22
|
from tenacity import retry
|
|
@@ -38,20 +34,33 @@ _FASTEST_FONT_METADATA: dict | None = None
|
|
|
38
34
|
class ResultContainer:
|
|
39
35
|
def __init__(self):
|
|
40
36
|
self.result = None
|
|
37
|
+
self.exception: BaseException | None = None
|
|
41
38
|
|
|
42
39
|
def set_result(self, result):
|
|
43
40
|
self.result = result
|
|
44
41
|
|
|
42
|
+
def set_exception(self, exc: BaseException):
|
|
43
|
+
self.exception = exc
|
|
44
|
+
|
|
45
45
|
|
|
46
46
|
def run_in_another_thread(coro):
|
|
47
47
|
result_container = ResultContainer()
|
|
48
48
|
|
|
49
49
|
def _wrapper():
|
|
50
|
-
|
|
50
|
+
try:
|
|
51
|
+
result_container.set_result(asyncio.run(coro))
|
|
52
|
+
except BaseException as exc: # noqa: BLE001
|
|
53
|
+
result_container.set_exception(exc)
|
|
51
54
|
|
|
52
55
|
thread = threading.Thread(target=_wrapper)
|
|
53
56
|
thread.start()
|
|
54
57
|
thread.join()
|
|
58
|
+
if result_container.exception is not None:
|
|
59
|
+
msg = (
|
|
60
|
+
"asset coroutine failed: "
|
|
61
|
+
f"{type(result_container.exception).__name__}: {result_container.exception}"
|
|
62
|
+
)
|
|
63
|
+
raise RuntimeError(msg) from result_container.exception
|
|
55
64
|
return result_container.result
|
|
56
65
|
|
|
57
66
|
|
|
@@ -248,23 +257,10 @@ async def get_doclayout_onnx_model_path_async(client: httpx.AsyncClient | None =
|
|
|
248
257
|
async def get_table_detection_rapidocr_model_path_async(
|
|
249
258
|
client: httpx.AsyncClient | None = None,
|
|
250
259
|
):
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
logger.info("table detection rapidocr model not found or corrupted, downloading...")
|
|
256
|
-
fastest_upstream, _ = await get_fastest_upstream_for_model(client)
|
|
257
|
-
if fastest_upstream is None:
|
|
258
|
-
logger.error("Failed to get fastest upstream")
|
|
259
|
-
exit(1)
|
|
260
|
-
|
|
261
|
-
url = TABLE_DETECTION_RAPIDOCR_MODEL_URL[fastest_upstream]
|
|
262
|
-
|
|
263
|
-
await download_file(client, url, onnx_path, TABLE_DETECTION_RAPIDOCR_MODEL_SHA3_256)
|
|
264
|
-
logger.info(
|
|
265
|
-
f"Download table detection rapidocr model from {fastest_upstream} success"
|
|
266
|
-
)
|
|
267
|
-
return onnx_path
|
|
260
|
+
_ = client
|
|
261
|
+
dummy_path = get_cache_file_path("rapidocr-retired-dummy.txt", "models")
|
|
262
|
+
dummy_path.write_text("RapidOCR table detection is retired.\n", encoding="utf-8")
|
|
263
|
+
return dummy_path
|
|
268
264
|
|
|
269
265
|
|
|
270
266
|
def get_doclayout_onnx_model_path():
|
|
@@ -457,12 +453,9 @@ async def async_warmup():
|
|
|
457
453
|
_ = encoding_for_model("gpt-4o")
|
|
458
454
|
async with httpx.AsyncClient() as client:
|
|
459
455
|
onnx_task = asyncio.create_task(get_doclayout_onnx_model_path_async(client))
|
|
460
|
-
onnx_task2 = asyncio.create_task(
|
|
461
|
-
get_table_detection_rapidocr_model_path_async(client)
|
|
462
|
-
)
|
|
463
456
|
font_tasks = asyncio.create_task(download_all_fonts_async(client))
|
|
464
457
|
cmap_tasks = asyncio.create_task(download_all_cmaps_async(client))
|
|
465
|
-
await asyncio.gather(onnx_task,
|
|
458
|
+
await asyncio.gather(onnx_task, font_tasks, cmap_tasks)
|
|
466
459
|
|
|
467
460
|
|
|
468
461
|
def warmup():
|
|
@@ -502,12 +495,6 @@ def generate_all_assets_file_list():
|
|
|
502
495
|
"sha3_256": DOCLAYOUT_YOLO_DOCSTRUCTBENCH_IMGSZ1024ONNX_SHA3_256,
|
|
503
496
|
},
|
|
504
497
|
)
|
|
505
|
-
result["models"].append(
|
|
506
|
-
{
|
|
507
|
-
"name": "ch_PP-OCRv4_det_infer.onnx",
|
|
508
|
-
"sha3_256": TABLE_DETECTION_RAPIDOCR_MODEL_SHA3_256,
|
|
509
|
-
},
|
|
510
|
-
)
|
|
511
498
|
return result
|
|
512
499
|
|
|
513
500
|
|
|
@@ -620,6 +607,4 @@ if __name__ == "__main__":
|
|
|
620
607
|
logging.getLogger("httpcore").setLevel(logging.WARNING)
|
|
621
608
|
# warmup()
|
|
622
609
|
# generate_offline_assets_package()
|
|
623
|
-
# restore_offline_assets_package(Path(
|
|
624
|
-
# '/Users/aw/.cache/babeldoc/assets/offline_assets_33971e4940e90ba0c35baacda44bbe83b214f4703a7bdb8b837de97d0383508c.zip'))
|
|
625
610
|
# warmup()
|
|
@@ -4,10 +4,6 @@ DOCLAYOUT_YOLO_DOCSTRUCTBENCH_IMGSZ1024ONNX_SHA3_256 = (
|
|
|
4
4
|
"60be061226930524958b5465c8c04af3d7c03bcb0beb66454f5da9f792e3cf2a"
|
|
5
5
|
)
|
|
6
6
|
|
|
7
|
-
TABLE_DETECTION_RAPIDOCR_MODEL_SHA3_256 = (
|
|
8
|
-
"062f4619afe91b33147c033acadecbb53f2a7b99ac703d157b96d5b10948da5e"
|
|
9
|
-
)
|
|
10
|
-
|
|
11
7
|
TIKTOKEN_CACHES = {
|
|
12
8
|
"fb374d419588a4632f3f557e76b4b70aebbca790": "cb04bcda5782cfbbe77f2f991d92c0ea785d9496ef1137c91dfc3c8c324528d6"
|
|
13
9
|
}
|
|
@@ -39,12 +35,6 @@ DOC_LAYOUT_ONNX_MODEL_URL = {
|
|
|
39
35
|
"modelscope": "https://www.modelscope.cn/models/AI-ModelScope/DocLayout-YOLO-DocStructBench-onnx/resolve/master/doclayout_yolo_docstructbench_imgsz1024.onnx",
|
|
40
36
|
}
|
|
41
37
|
|
|
42
|
-
TABLE_DETECTION_RAPIDOCR_MODEL_URL = {
|
|
43
|
-
"huggingface": "https://huggingface.co/spaces/RapidAI/RapidOCR/resolve/main/models/text_det/ch_PP-OCRv4_det_infer.onnx",
|
|
44
|
-
"hf-mirror": "https://hf-mirror.com/spaces/RapidAI/RapidOCR/resolve/main/models/text_det/ch_PP-OCRv4_det_infer.onnx",
|
|
45
|
-
"modelscope": "https://www.modelscope.cn/models/RapidAI/RapidOCR/resolve/master/onnx/PP-OCRv4/det/ch_PP-OCRv4_det_infer.onnx",
|
|
46
|
-
}
|
|
47
|
-
|
|
48
38
|
# from https://github.com/funstory-ai/BabelDOC-Assets/blob/main/font_metadata.json
|
|
49
39
|
EMBEDDING_FONT_METADATA = {
|
|
50
40
|
"GoNotoKurrent-Bold.ttf": {
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import base64
|
|
4
|
+
import os
|
|
5
|
+
import unicodedata
|
|
6
|
+
from concurrent.futures import FIRST_COMPLETED
|
|
7
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
8
|
+
from concurrent.futures import wait
|
|
9
|
+
from dataclasses import dataclass
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
import cv2
|
|
13
|
+
import httpx
|
|
14
|
+
import numpy as np
|
|
15
|
+
import pymupdf
|
|
16
|
+
|
|
17
|
+
from babeldoc.docvision.base_doclayout import DocLayoutModel
|
|
18
|
+
from babeldoc.docvision.base_doclayout import YoloBox
|
|
19
|
+
from babeldoc.docvision.base_doclayout import YoloResult
|
|
20
|
+
from babeldoc.format.pdf.document_il import il_version_1
|
|
21
|
+
from babeldoc.format.pdf.document_il.utils.extract_char import (
|
|
22
|
+
convert_page_to_char_boxes,
|
|
23
|
+
)
|
|
24
|
+
from babeldoc.format.pdf.document_il.utils.extract_char import (
|
|
25
|
+
process_page_chars_to_lines,
|
|
26
|
+
)
|
|
27
|
+
from babeldoc.format.pdf.document_il.utils.fontmap import FontMapper
|
|
28
|
+
from babeldoc.format.pdf.document_il.utils.layout_helper import SPACE_REGEX
|
|
29
|
+
from babeldoc.format.pdf.document_il.utils.mupdf_helper import get_no_rotation_img
|
|
30
|
+
|
|
31
|
+
DPI = 150
|
|
32
|
+
LAYOUT_ERROR = "layout 解析失败"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _positive_int_env(name: str, default: int) -> int:
|
|
36
|
+
raw = os.environ.get(name)
|
|
37
|
+
if raw is None:
|
|
38
|
+
return default
|
|
39
|
+
try:
|
|
40
|
+
value = int(raw)
|
|
41
|
+
except ValueError as exc:
|
|
42
|
+
raise ValueError(f"{name} must be a positive integer") from exc
|
|
43
|
+
if value < 1:
|
|
44
|
+
raise ValueError(f"{name} must be a positive integer")
|
|
45
|
+
return value
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _positive_float_env(name: str, default: float) -> float:
|
|
49
|
+
raw = os.environ.get(name)
|
|
50
|
+
if raw is None:
|
|
51
|
+
return default
|
|
52
|
+
try:
|
|
53
|
+
value = float(raw)
|
|
54
|
+
except ValueError as exc:
|
|
55
|
+
raise ValueError(f"{name} must be positive") from exc
|
|
56
|
+
if value <= 0:
|
|
57
|
+
raise ValueError(f"{name} must be positive")
|
|
58
|
+
return value
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _encode_image(image: np.ndarray) -> bytes:
|
|
62
|
+
image_bgr = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
|
|
63
|
+
ok, encoded = cv2.imencode(".jpg", image_bgr)
|
|
64
|
+
if not ok:
|
|
65
|
+
raise RuntimeError(LAYOUT_ERROR)
|
|
66
|
+
return encoded.tobytes()
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _clip_num(num: float, min_value: float, max_value: float) -> float:
|
|
70
|
+
if num < min_value:
|
|
71
|
+
return min_value
|
|
72
|
+
if num > max_value:
|
|
73
|
+
return max_value
|
|
74
|
+
return num
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _filter_text(text: str, font_mapper: FontMapper) -> str:
|
|
78
|
+
normalize = unicodedata.normalize("NFKC", text)
|
|
79
|
+
unicodes = [char for char in normalize if font_mapper.has_char(char)]
|
|
80
|
+
normalize = "".join(unicodes)
|
|
81
|
+
return SPACE_REGEX.sub(" ", normalize).strip()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@dataclass(frozen=True)
|
|
85
|
+
class _PageInput:
|
|
86
|
+
index: int
|
|
87
|
+
page: il_version_1.Page
|
|
88
|
+
image: np.ndarray
|
|
89
|
+
image_data: bytes
|
|
90
|
+
line_results: list[dict[str, Any]] | None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class RpcDocLayoutModel(DocLayoutModel):
|
|
94
|
+
def __init__(self, host: str, requires_line_extraction: bool = False):
|
|
95
|
+
if not isinstance(host, str) or not host:
|
|
96
|
+
raise ValueError("rpc_doclayout8 host is required")
|
|
97
|
+
if ";" in host:
|
|
98
|
+
raise ValueError("rpc_doclayout8 host must be a single task-local URL")
|
|
99
|
+
self.host = host.rstrip("/")
|
|
100
|
+
self.requires_line_extraction = bool(requires_line_extraction)
|
|
101
|
+
self.layout_page_input_buffer_limit = _positive_int_env(
|
|
102
|
+
"BABELDOC_EXECUTOR_LAYOUT_PAGE_INPUT_BUFFER_LIMIT",
|
|
103
|
+
2,
|
|
104
|
+
)
|
|
105
|
+
self.line_extraction_max_workers = _positive_int_env(
|
|
106
|
+
"BABELDOC_EXECUTOR_LAYOUT_LINE_EXTRACTION_MAX_WORKERS",
|
|
107
|
+
1,
|
|
108
|
+
)
|
|
109
|
+
self.layout_request_max_workers = _positive_int_env(
|
|
110
|
+
"BABELDOC_EXECUTOR_LAYOUT_REQUEST_MAX_WORKERS",
|
|
111
|
+
8,
|
|
112
|
+
)
|
|
113
|
+
self.layout_request_timeout_seconds = _positive_float_env(
|
|
114
|
+
"BABELDOC_EXECUTOR_LAYOUT_REQUEST_TIMEOUT_SECONDS",
|
|
115
|
+
600.0,
|
|
116
|
+
)
|
|
117
|
+
self.font_mapper: FontMapper | None = None
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def stride(self) -> int:
|
|
121
|
+
return 32
|
|
122
|
+
|
|
123
|
+
def init_font_mapper(self, translation_config) -> None:
|
|
124
|
+
if self.requires_line_extraction:
|
|
125
|
+
self.font_mapper = FontMapper(translation_config)
|
|
126
|
+
|
|
127
|
+
def handle_document(
|
|
128
|
+
self,
|
|
129
|
+
pages: list[il_version_1.Page],
|
|
130
|
+
mupdf_doc: pymupdf.Document,
|
|
131
|
+
translate_config,
|
|
132
|
+
save_debug_image,
|
|
133
|
+
):
|
|
134
|
+
with (
|
|
135
|
+
ThreadPoolExecutor(
|
|
136
|
+
max_workers=self.layout_request_max_workers,
|
|
137
|
+
) as layout_executor,
|
|
138
|
+
ThreadPoolExecutor(
|
|
139
|
+
max_workers=self.line_extraction_max_workers,
|
|
140
|
+
) as line_executor,
|
|
141
|
+
):
|
|
142
|
+
futures = {}
|
|
143
|
+
completed = {}
|
|
144
|
+
next_submit = 0
|
|
145
|
+
next_yield = 0
|
|
146
|
+
max_in_flight = (
|
|
147
|
+
self.layout_request_max_workers + self.layout_page_input_buffer_limit
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
def fill_window() -> None:
|
|
151
|
+
nonlocal next_submit
|
|
152
|
+
while (
|
|
153
|
+
next_submit < len(pages)
|
|
154
|
+
and (len(futures) + len(completed)) < max_in_flight
|
|
155
|
+
):
|
|
156
|
+
page_input = self._prepare_page_input(
|
|
157
|
+
next_submit,
|
|
158
|
+
pages[next_submit],
|
|
159
|
+
mupdf_doc,
|
|
160
|
+
translate_config,
|
|
161
|
+
line_executor,
|
|
162
|
+
)
|
|
163
|
+
future = layout_executor.submit(
|
|
164
|
+
self._request_layout,
|
|
165
|
+
page_input,
|
|
166
|
+
translate_config,
|
|
167
|
+
)
|
|
168
|
+
futures[future] = next_submit
|
|
169
|
+
next_submit += 1
|
|
170
|
+
|
|
171
|
+
fill_window()
|
|
172
|
+
while next_yield < len(pages):
|
|
173
|
+
if next_yield in completed:
|
|
174
|
+
yield completed.pop(next_yield)
|
|
175
|
+
next_yield += 1
|
|
176
|
+
fill_window()
|
|
177
|
+
continue
|
|
178
|
+
|
|
179
|
+
done, _pending = wait(futures.keys(), return_when=FIRST_COMPLETED)
|
|
180
|
+
for future in done:
|
|
181
|
+
index = futures.pop(future)
|
|
182
|
+
try:
|
|
183
|
+
completed[index] = future.result()
|
|
184
|
+
except Exception as exc:
|
|
185
|
+
raise RuntimeError(LAYOUT_ERROR) from exc
|
|
186
|
+
fill_window()
|
|
187
|
+
|
|
188
|
+
def _prepare_page_input(
|
|
189
|
+
self,
|
|
190
|
+
index: int,
|
|
191
|
+
page: il_version_1.Page,
|
|
192
|
+
mupdf_doc: pymupdf.Document,
|
|
193
|
+
translate_config,
|
|
194
|
+
line_executor: ThreadPoolExecutor,
|
|
195
|
+
) -> _PageInput:
|
|
196
|
+
translate_config.raise_if_cancelled()
|
|
197
|
+
line_future = (
|
|
198
|
+
line_executor.submit(self._extract_raw_lines, page)
|
|
199
|
+
if self.requires_line_extraction
|
|
200
|
+
else None
|
|
201
|
+
)
|
|
202
|
+
pix = get_no_rotation_img(mupdf_doc[page.page_number], dpi=DPI)
|
|
203
|
+
image = np.frombuffer(pix.samples, np.uint8).reshape(
|
|
204
|
+
pix.height,
|
|
205
|
+
pix.width,
|
|
206
|
+
3,
|
|
207
|
+
)
|
|
208
|
+
image_data = _encode_image(image)
|
|
209
|
+
line_results = (
|
|
210
|
+
self._convert_line_results(
|
|
211
|
+
line_future.result(),
|
|
212
|
+
image.shape[1],
|
|
213
|
+
image.shape[0],
|
|
214
|
+
)
|
|
215
|
+
if line_future is not None
|
|
216
|
+
else None
|
|
217
|
+
)
|
|
218
|
+
return _PageInput(index, page, image, image_data, line_results)
|
|
219
|
+
|
|
220
|
+
def _extract_raw_lines(self, page: il_version_1.Page):
|
|
221
|
+
if self.font_mapper is None:
|
|
222
|
+
raise RuntimeError(LAYOUT_ERROR)
|
|
223
|
+
|
|
224
|
+
char_boxes = convert_page_to_char_boxes(page)
|
|
225
|
+
return process_page_chars_to_lines(char_boxes)
|
|
226
|
+
|
|
227
|
+
def _convert_line_results(
|
|
228
|
+
self,
|
|
229
|
+
lines,
|
|
230
|
+
image_width: int,
|
|
231
|
+
image_height: int,
|
|
232
|
+
) -> list[dict[str, Any]]:
|
|
233
|
+
results = []
|
|
234
|
+
for line in lines:
|
|
235
|
+
converted = self._convert_line(line, image_width, image_height)
|
|
236
|
+
if converted is not None:
|
|
237
|
+
results.append(converted)
|
|
238
|
+
return results
|
|
239
|
+
|
|
240
|
+
def _convert_line(
|
|
241
|
+
self,
|
|
242
|
+
line,
|
|
243
|
+
image_width: int,
|
|
244
|
+
image_height: int,
|
|
245
|
+
) -> dict[str, Any] | None:
|
|
246
|
+
if not line.text or self.font_mapper is None:
|
|
247
|
+
return None
|
|
248
|
+
boxes = [char[0] for char in line.chars]
|
|
249
|
+
min_x = min(box.x for box in boxes)
|
|
250
|
+
max_x = max(box.x2 for box in boxes)
|
|
251
|
+
min_y = min(box.y for box in boxes)
|
|
252
|
+
max_y = max(box.y2 for box in boxes)
|
|
253
|
+
|
|
254
|
+
min_x = min_x / 72 * DPI
|
|
255
|
+
max_x = max_x / 72 * DPI
|
|
256
|
+
min_y = min_y / 72 * DPI
|
|
257
|
+
max_y = max_y / 72 * DPI
|
|
258
|
+
min_y, max_y = image_height - max_y, image_height - min_y
|
|
259
|
+
|
|
260
|
+
box_volume = (max_x - min_x) * (max_y - min_y)
|
|
261
|
+
if box_volume < 1:
|
|
262
|
+
return None
|
|
263
|
+
|
|
264
|
+
min_x = _clip_num(min_x, 0, image_width - 1)
|
|
265
|
+
max_x = _clip_num(max_x, 0, image_width - 1)
|
|
266
|
+
min_y = _clip_num(min_y, 0, image_height - 1)
|
|
267
|
+
max_y = _clip_num(max_y, 0, image_height - 1)
|
|
268
|
+
|
|
269
|
+
filtered_text = _filter_text(line.text, self.font_mapper)
|
|
270
|
+
if not filtered_text:
|
|
271
|
+
return None
|
|
272
|
+
|
|
273
|
+
return {
|
|
274
|
+
"box": [min_x, min_y, max_x, max_y],
|
|
275
|
+
"text": filtered_text,
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
def _request_layout(
|
|
279
|
+
self,
|
|
280
|
+
page_input: _PageInput,
|
|
281
|
+
translate_config,
|
|
282
|
+
):
|
|
283
|
+
translate_config.raise_if_cancelled()
|
|
284
|
+
request_body: dict[str, Any] = {
|
|
285
|
+
"schema_version": 1,
|
|
286
|
+
"page_number": page_input.page.page_number,
|
|
287
|
+
"dpi": DPI,
|
|
288
|
+
"image": base64.b64encode(page_input.image_data).decode("utf-8"),
|
|
289
|
+
"image_size": [page_input.image.shape[1], page_input.image.shape[0]],
|
|
290
|
+
}
|
|
291
|
+
if self.requires_line_extraction:
|
|
292
|
+
request_body["line_results"] = page_input.line_results or []
|
|
293
|
+
|
|
294
|
+
try:
|
|
295
|
+
response = httpx.post(
|
|
296
|
+
f"{self.host}/inference",
|
|
297
|
+
json=request_body,
|
|
298
|
+
headers={
|
|
299
|
+
"Accept": "application/json",
|
|
300
|
+
"Content-Type": "application/json",
|
|
301
|
+
},
|
|
302
|
+
timeout=self.layout_request_timeout_seconds,
|
|
303
|
+
follow_redirects=True,
|
|
304
|
+
)
|
|
305
|
+
if response.status_code < 200 or response.status_code >= 300:
|
|
306
|
+
raise RuntimeError(LAYOUT_ERROR)
|
|
307
|
+
payload = response.json()
|
|
308
|
+
yolo_result = self._parse_response(
|
|
309
|
+
payload,
|
|
310
|
+
page_input.image.shape[1],
|
|
311
|
+
page_input.image.shape[0],
|
|
312
|
+
)
|
|
313
|
+
return page_input.page, yolo_result
|
|
314
|
+
except Exception as exc:
|
|
315
|
+
raise RuntimeError(LAYOUT_ERROR) from exc
|
|
316
|
+
|
|
317
|
+
def _parse_response(
|
|
318
|
+
self,
|
|
319
|
+
payload: Any,
|
|
320
|
+
_image_width: int,
|
|
321
|
+
_image_height: int,
|
|
322
|
+
) -> YoloResult:
|
|
323
|
+
if not isinstance(payload, dict) or payload.get("schema_version") != 1:
|
|
324
|
+
raise RuntimeError(LAYOUT_ERROR)
|
|
325
|
+
boxes_payload = payload.get("boxes")
|
|
326
|
+
if not isinstance(boxes_payload, list):
|
|
327
|
+
raise RuntimeError(LAYOUT_ERROR)
|
|
328
|
+
|
|
329
|
+
names: dict[int, str] = {}
|
|
330
|
+
boxes: list[YoloBox] = []
|
|
331
|
+
scale = 72 / DPI
|
|
332
|
+
for item in boxes_payload:
|
|
333
|
+
if not isinstance(item, dict):
|
|
334
|
+
raise RuntimeError(LAYOUT_ERROR)
|
|
335
|
+
class_id = item.get("class_id")
|
|
336
|
+
label = item.get("label")
|
|
337
|
+
score = item.get("score")
|
|
338
|
+
box = item.get("box")
|
|
339
|
+
if (
|
|
340
|
+
not isinstance(class_id, int)
|
|
341
|
+
or not isinstance(label, str)
|
|
342
|
+
or not isinstance(score, int | float)
|
|
343
|
+
or not isinstance(box, list)
|
|
344
|
+
or len(box) != 4
|
|
345
|
+
):
|
|
346
|
+
raise RuntimeError(LAYOUT_ERROR)
|
|
347
|
+
coords = [float(value) * scale for value in box]
|
|
348
|
+
names[class_id] = label
|
|
349
|
+
boxes.append(
|
|
350
|
+
YoloBox(
|
|
351
|
+
None,
|
|
352
|
+
np.array(coords),
|
|
353
|
+
np.array(float(score)),
|
|
354
|
+
class_id,
|
|
355
|
+
)
|
|
356
|
+
)
|
|
357
|
+
return YoloResult(boxes=boxes, names=names)
|
|
358
|
+
|
|
359
|
+
@staticmethod
|
|
360
|
+
def from_host(host: str) -> RpcDocLayoutModel:
|
|
361
|
+
return RpcDocLayoutModel(host=host, requires_line_extraction=False)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from collections.abc import Generator
|
|
2
|
+
|
|
3
|
+
import babeldoc.format.pdf.document_il.il_version_1
|
|
4
|
+
import numpy as np
|
|
5
|
+
import pymupdf
|
|
6
|
+
from babeldoc.docvision.base_doclayout import YoloResult
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class RapidOCRModel:
|
|
10
|
+
"""Compatibility no-op for the retired RapidOCR table text detector."""
|
|
11
|
+
|
|
12
|
+
names = {0: "table_text"}
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def stride(self):
|
|
16
|
+
return 32
|
|
17
|
+
|
|
18
|
+
def predict(self, image, imgsz=800, batch_size=16, **kwargs):
|
|
19
|
+
_ = image, imgsz, batch_size, kwargs
|
|
20
|
+
return YoloResult(names=self.names, boxes=[])
|
|
21
|
+
|
|
22
|
+
def handle_document(
|
|
23
|
+
self,
|
|
24
|
+
pages: list[babeldoc.format.pdf.document_il.il_version_1.Page],
|
|
25
|
+
mupdf_doc: pymupdf.Document,
|
|
26
|
+
translate_config,
|
|
27
|
+
save_debug_image,
|
|
28
|
+
) -> Generator[
|
|
29
|
+
tuple[babeldoc.format.pdf.document_il.il_version_1.Page, YoloResult], None, None
|
|
30
|
+
]:
|
|
31
|
+
_ = mupdf_doc
|
|
32
|
+
for page in pages:
|
|
33
|
+
translate_config.raise_if_cancelled()
|
|
34
|
+
yolo_result = YoloResult(names=self.names, boxes=[])
|
|
35
|
+
if save_debug_image is not None:
|
|
36
|
+
save_debug_image(
|
|
37
|
+
np.zeros((1, 1, 3), dtype=np.uint8),
|
|
38
|
+
yolo_result,
|
|
39
|
+
page.page_number + 1,
|
|
40
|
+
)
|
|
41
|
+
yield page, yolo_result
|