BabelDOC 0.5.22__tar.gz → 0.5.24__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.
Files changed (317) hide show
  1. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/ISSUE_TEMPLATE/bug_report.yaml +9 -1
  2. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/workflows/codeql.yml +1 -1
  3. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/workflows/docs.yml +2 -2
  4. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/workflows/labeler.yml +2 -2
  5. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/workflows/lint.yml +1 -1
  6. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/workflows/pr-lint.yml +3 -3
  7. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/workflows/publish-to-pypi.yml +3 -3
  8. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/workflows/test.yml +2 -2
  9. {babeldoc-0.5.22 → babeldoc-0.5.24}/.gitignore +1 -0
  10. {babeldoc-0.5.22 → babeldoc-0.5.24}/PKG-INFO +4 -2
  11. {babeldoc-0.5.22 → babeldoc-0.5.24}/README.md +2 -0
  12. babeldoc-0.5.24/babeldoc/__init__.py +1 -0
  13. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/const.py +1 -1
  14. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/doclayout.py +45 -9
  15. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/babelpdf/cidfont.py +6 -2
  16. babeldoc-0.5.24/babeldoc/format/pdf/babelpdf/type3.py +41 -0
  17. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/backend/pdf_creater.py +8 -5
  18. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/frontend/il_creater.py +6 -8
  19. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/automatic_term_extractor.py +1 -1
  20. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/il_translator_llm_only.py +18 -10
  21. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/result_merger.py +1 -1
  22. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/translation_config.py +2 -0
  23. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/main.py +8 -1
  24. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/translator/translator.py +8 -2
  25. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/CONTRIBUTING.md +6 -0
  26. {babeldoc-0.5.22 → babeldoc-0.5.24}/mkdocs.yml +1 -0
  27. {babeldoc-0.5.22 → babeldoc-0.5.24}/pyproject.toml +3 -3
  28. babeldoc-0.5.22/.cursorignore +0 -2
  29. babeldoc-0.5.22/babeldoc/__init__.py +0 -1
  30. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
  31. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/PULL_REQUEST_TEMPLATE/pr_form.yml +0 -0
  32. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  33. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/dependabot.yml +0 -0
  34. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/labels.yml +0 -0
  35. {babeldoc-0.5.22 → babeldoc-0.5.24}/.github/release-drafter.yml +0 -0
  36. {babeldoc-0.5.22 → babeldoc-0.5.24}/.pre-commit-config.yaml +0 -0
  37. {babeldoc-0.5.22 → babeldoc-0.5.24}/LICENSE +0 -0
  38. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/assets/assets.py +0 -0
  39. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/assets/embedding_assets_metadata.py +0 -0
  40. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/asynchronize/__init__.py +0 -0
  41. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/babeldoc_exception/BabelDOCException.py +0 -0
  42. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/babeldoc_exception/__init__.py +0 -0
  43. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/README.md +0 -0
  44. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/__init__.py +0 -0
  45. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/base_doclayout.py +0 -0
  46. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/rpc_doclayout.py +0 -0
  47. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/rpc_doclayout2.py +0 -0
  48. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/rpc_doclayout3.py +0 -0
  49. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/rpc_doclayout4.py +0 -0
  50. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/rpc_doclayout5.py +0 -0
  51. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/rpc_doclayout6.py +0 -0
  52. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/rpc_doclayout7.py +0 -0
  53. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/docvision/table_detection/rapidocr.py +0 -0
  54. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/__init__.py +0 -0
  55. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/__init__.py +0 -0
  56. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/babelpdf/base14.py +0 -0
  57. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/babelpdf/cmap.py +0 -0
  58. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/babelpdf/encoding.py +0 -0
  59. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/babelpdf/utils.py +0 -0
  60. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/babelpdf/win_core.py +0 -0
  61. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/converter.py +0 -0
  62. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/__init__.py +0 -0
  63. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/backend/__init__.py +0 -0
  64. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/frontend/__init__.py +0 -0
  65. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/il_version_1.py +0 -0
  66. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/il_version_1.rnc +0 -0
  67. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/il_version_1.rng +0 -0
  68. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/il_version_1.xsd +0 -0
  69. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/__init__.py +0 -0
  70. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/add_debug_information.py +0 -0
  71. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/detect_scanned_file.py +0 -0
  72. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/il_translator.py +0 -0
  73. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/layout_parser.py +0 -0
  74. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/paragraph_finder.py +0 -0
  75. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/remove_descent.py +0 -0
  76. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/styles_and_formulas.py +0 -0
  77. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/table_parser.py +0 -0
  78. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/midend/typesetting.py +0 -0
  79. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/__init__.py +0 -0
  80. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/extract_char.py +0 -0
  81. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/fontmap.py +0 -0
  82. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/formular_helper.py +0 -0
  83. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/layout_helper.py +0 -0
  84. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/matrix_helper.py +0 -0
  85. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/mupdf_helper.py +0 -0
  86. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/paragraph_helper.py +0 -0
  87. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/spatial_analyzer.py +0 -0
  88. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/style_helper.py +0 -0
  89. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/utils/zstd_helper.py +0 -0
  90. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/document_il/xml_converter.py +0 -0
  91. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/high_level.py +0 -0
  92. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/pdfinterp.py +0 -0
  93. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/format/pdf/split_manager.py +0 -0
  94. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/glossary.py +0 -0
  95. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/LICENSE +0 -0
  96. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/__init__.py +0 -0
  97. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/_saslprep.py +0 -0
  98. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/arcfour.py +0 -0
  99. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/ascii85.py +0 -0
  100. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/casting.py +0 -0
  101. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/ccitt.py +0 -0
  102. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/78-EUC-H.pickle.gz +0 -0
  103. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/78-EUC-V.pickle.gz +0 -0
  104. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/78-H.pickle.gz +0 -0
  105. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/78-RKSJ-H.pickle.gz +0 -0
  106. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/78-RKSJ-V.pickle.gz +0 -0
  107. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/78-V.pickle.gz +0 -0
  108. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/78ms-RKSJ-H.pickle.gz +0 -0
  109. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/78ms-RKSJ-V.pickle.gz +0 -0
  110. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/83pv-RKSJ-H.pickle.gz +0 -0
  111. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/83pv-RKSJ-V.pickle.gz +0 -0
  112. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/90ms-RKSJ-H.pickle.gz +0 -0
  113. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/90ms-RKSJ-V.pickle.gz +0 -0
  114. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/90msp-RKSJ-H.pickle.gz +0 -0
  115. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/90msp-RKSJ-V.pickle.gz +0 -0
  116. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/90pv-RKSJ-H.pickle.gz +0 -0
  117. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/90pv-RKSJ-V.pickle.gz +0 -0
  118. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Add-H.pickle.gz +0 -0
  119. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Add-RKSJ-H.pickle.gz +0 -0
  120. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Add-RKSJ-V.pickle.gz +0 -0
  121. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Add-V.pickle.gz +0 -0
  122. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/B5-H.pickle.gz +0 -0
  123. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/B5-V.pickle.gz +0 -0
  124. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/B5pc-H.pickle.gz +0 -0
  125. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/B5pc-V.pickle.gz +0 -0
  126. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/CNS-EUC-H.pickle.gz +0 -0
  127. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/CNS-EUC-V.pickle.gz +0 -0
  128. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/CNS1-H.pickle.gz +0 -0
  129. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/CNS1-V.pickle.gz +0 -0
  130. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/CNS2-H.pickle.gz +0 -0
  131. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/CNS2-V.pickle.gz +0 -0
  132. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/ETHK-B5-H.pickle.gz +0 -0
  133. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/ETHK-B5-V.pickle.gz +0 -0
  134. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/ETen-B5-H.pickle.gz +0 -0
  135. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/ETen-B5-V.pickle.gz +0 -0
  136. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/ETenms-B5-H.pickle.gz +0 -0
  137. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/ETenms-B5-V.pickle.gz +0 -0
  138. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/EUC-H.pickle.gz +0 -0
  139. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/EUC-V.pickle.gz +0 -0
  140. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Ext-H.pickle.gz +0 -0
  141. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Ext-RKSJ-H.pickle.gz +0 -0
  142. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Ext-RKSJ-V.pickle.gz +0 -0
  143. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Ext-V.pickle.gz +0 -0
  144. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GB-EUC-H.pickle.gz +0 -0
  145. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GB-EUC-V.pickle.gz +0 -0
  146. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GB-H.pickle.gz +0 -0
  147. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GB-V.pickle.gz +0 -0
  148. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBK-EUC-H.pickle.gz +0 -0
  149. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBK-EUC-V.pickle.gz +0 -0
  150. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBK2K-H.pickle.gz +0 -0
  151. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBK2K-V.pickle.gz +0 -0
  152. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBKp-EUC-H.pickle.gz +0 -0
  153. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBKp-EUC-V.pickle.gz +0 -0
  154. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBT-EUC-H.pickle.gz +0 -0
  155. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBT-EUC-V.pickle.gz +0 -0
  156. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBT-H.pickle.gz +0 -0
  157. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBT-V.pickle.gz +0 -0
  158. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBTpc-EUC-H.pickle.gz +0 -0
  159. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBTpc-EUC-V.pickle.gz +0 -0
  160. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBpc-EUC-H.pickle.gz +0 -0
  161. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/GBpc-EUC-V.pickle.gz +0 -0
  162. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/H.pickle.gz +0 -0
  163. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKdla-B5-H.pickle.gz +0 -0
  164. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKdla-B5-V.pickle.gz +0 -0
  165. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKdlb-B5-H.pickle.gz +0 -0
  166. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKdlb-B5-V.pickle.gz +0 -0
  167. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKgccs-B5-H.pickle.gz +0 -0
  168. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKgccs-B5-V.pickle.gz +0 -0
  169. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKm314-B5-H.pickle.gz +0 -0
  170. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKm314-B5-V.pickle.gz +0 -0
  171. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKm471-B5-H.pickle.gz +0 -0
  172. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKm471-B5-V.pickle.gz +0 -0
  173. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKscs-B5-H.pickle.gz +0 -0
  174. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/HKscs-B5-V.pickle.gz +0 -0
  175. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Hankaku-H.pickle.gz +0 -0
  176. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Hankaku-V.pickle.gz +0 -0
  177. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Hiragana-H.pickle.gz +0 -0
  178. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Hiragana-V.pickle.gz +0 -0
  179. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSC-EUC-H.pickle.gz +0 -0
  180. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSC-EUC-V.pickle.gz +0 -0
  181. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSC-H.pickle.gz +0 -0
  182. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSC-Johab-H.pickle.gz +0 -0
  183. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSC-Johab-V.pickle.gz +0 -0
  184. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSC-V.pickle.gz +0 -0
  185. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSCms-UHC-H.pickle.gz +0 -0
  186. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-H.pickle.gz +0 -0
  187. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSCms-UHC-HW-V.pickle.gz +0 -0
  188. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSCms-UHC-V.pickle.gz +0 -0
  189. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSCpc-EUC-H.pickle.gz +0 -0
  190. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/KSCpc-EUC-V.pickle.gz +0 -0
  191. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Katakana-H.pickle.gz +0 -0
  192. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Katakana-V.pickle.gz +0 -0
  193. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/NWP-H.pickle.gz +0 -0
  194. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/NWP-V.pickle.gz +0 -0
  195. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/README.txt +0 -0
  196. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/RKSJ-H.pickle.gz +0 -0
  197. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/RKSJ-V.pickle.gz +0 -0
  198. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Roman-H.pickle.gz +0 -0
  199. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/Roman-V.pickle.gz +0 -0
  200. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniCNS-UCS2-H.pickle.gz +0 -0
  201. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniCNS-UCS2-V.pickle.gz +0 -0
  202. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniCNS-UTF16-H.pickle.gz +0 -0
  203. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniCNS-UTF16-V.pickle.gz +0 -0
  204. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniCNS-UTF32-H.pickle.gz +0 -0
  205. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniCNS-UTF32-V.pickle.gz +0 -0
  206. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniCNS-UTF8-H.pickle.gz +0 -0
  207. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniCNS-UTF8-V.pickle.gz +0 -0
  208. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniGB-UCS2-H.pickle.gz +0 -0
  209. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniGB-UCS2-V.pickle.gz +0 -0
  210. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniGB-UTF16-H.pickle.gz +0 -0
  211. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniGB-UTF16-V.pickle.gz +0 -0
  212. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniGB-UTF32-H.pickle.gz +0 -0
  213. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniGB-UTF32-V.pickle.gz +0 -0
  214. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniGB-UTF8-H.pickle.gz +0 -0
  215. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniGB-UTF8-V.pickle.gz +0 -0
  216. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UCS2-H.pickle.gz +0 -0
  217. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-H.pickle.gz +0 -0
  218. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UCS2-HW-V.pickle.gz +0 -0
  219. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UCS2-V.pickle.gz +0 -0
  220. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UTF16-H.pickle.gz +0 -0
  221. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UTF16-V.pickle.gz +0 -0
  222. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UTF32-H.pickle.gz +0 -0
  223. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UTF32-V.pickle.gz +0 -0
  224. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UTF8-H.pickle.gz +0 -0
  225. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS-UTF8-V.pickle.gz +0 -0
  226. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-H.pickle.gz +0 -0
  227. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS2004-UTF16-V.pickle.gz +0 -0
  228. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-H.pickle.gz +0 -0
  229. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS2004-UTF32-V.pickle.gz +0 -0
  230. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-H.pickle.gz +0 -0
  231. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJIS2004-UTF8-V.pickle.gz +0 -0
  232. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-H.pickle.gz +0 -0
  233. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJISX0213-UTF32-V.pickle.gz +0 -0
  234. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-H.pickle.gz +0 -0
  235. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniJISX02132004-UTF32-V.pickle.gz +0 -0
  236. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniKS-UCS2-H.pickle.gz +0 -0
  237. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniKS-UCS2-V.pickle.gz +0 -0
  238. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniKS-UTF16-H.pickle.gz +0 -0
  239. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniKS-UTF16-V.pickle.gz +0 -0
  240. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniKS-UTF32-H.pickle.gz +0 -0
  241. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniKS-UTF32-V.pickle.gz +0 -0
  242. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniKS-UTF8-H.pickle.gz +0 -0
  243. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/UniKS-UTF8-V.pickle.gz +0 -0
  244. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/V.pickle.gz +0 -0
  245. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/WP-Symbol-H.pickle.gz +0 -0
  246. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/WP-Symbol-V.pickle.gz +0 -0
  247. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/to-unicode-Adobe-CNS1.pickle.gz +0 -0
  248. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/to-unicode-Adobe-GB1.pickle.gz +0 -0
  249. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Japan1.pickle.gz +0 -0
  250. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmap/to-unicode-Adobe-Korea1.pickle.gz +0 -0
  251. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/cmapdb.py +0 -0
  252. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/converter.py +0 -0
  253. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/data_structures.py +0 -0
  254. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/encodingdb.py +0 -0
  255. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/fontmetrics.py +0 -0
  256. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/glyphlist.py +0 -0
  257. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/high_level.py +0 -0
  258. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/image.py +0 -0
  259. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/jbig2.py +0 -0
  260. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/latin_enc.py +0 -0
  261. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/layout.py +0 -0
  262. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/lzw.py +0 -0
  263. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdfcolor.py +0 -0
  264. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdfdevice.py +0 -0
  265. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdfdocument.py +0 -0
  266. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdfexceptions.py +0 -0
  267. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdffont.py +0 -0
  268. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdfinterp.py +0 -0
  269. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdfpage.py +0 -0
  270. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdfparser.py +0 -0
  271. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/pdftypes.py +0 -0
  272. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/psexceptions.py +0 -0
  273. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/psparser.py +0 -0
  274. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/py.typed +0 -0
  275. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/runlength.py +0 -0
  276. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/settings.py +0 -0
  277. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/pdfminer/utils.py +0 -0
  278. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/progress_monitor.py +0 -0
  279. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/tools/generate_cmap_metadata.py +0 -0
  280. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/tools/generate_font_metadata.py +0 -0
  281. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/tools/italic_assistance.py +0 -0
  282. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/tools/italic_recognize_tool.py +0 -0
  283. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/translator/__init__.py +0 -0
  284. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/translator/cache.py +0 -0
  285. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/utils/__init__.py +0 -0
  286. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/utils/atomic_integer.py +0 -0
  287. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/utils/memory.py +0 -0
  288. {babeldoc-0.5.22 → babeldoc-0.5.24}/babeldoc/utils/priority_thread_pool_executor.py +0 -0
  289. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/CODE_OF_CONDUCT.md +0 -0
  290. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/CONTRIBUTOR_REWARD.md +0 -0
  291. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
  292. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
  293. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
  294. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
  295. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
  296. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/ImplementationDetails/README.md +0 -0
  297. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
  298. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
  299. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/README.md +0 -0
  300. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/deploy.sh +0 -0
  301. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/example/demo_glossary.csv +0 -0
  302. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-banner.png +0 -0
  303. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
  304. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
  305. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
  306. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
  307. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-big-logo.png +0 -0
  308. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-contributor_reward_example.png +0 -0
  309. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-preview.gif +0 -0
  310. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
  311. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
  312. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/images/babeldoc-small-logo.png +0 -0
  313. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/index.md +0 -0
  314. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/intro-to-pdf-object.md +0 -0
  315. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/requirements.txt +0 -0
  316. {babeldoc-0.5.22 → babeldoc-0.5.24}/docs/supported_languages.md +0 -0
  317. {babeldoc-0.5.22 → babeldoc-0.5.24}/tests/test_translation_cache_cleanup.py +0 -0
@@ -23,6 +23,8 @@ body:
23
23
  required: true
24
24
  - label: I confirm that the latest version of BabelDOC is being used.
25
25
  required: true
26
+ - label: I am aware that the issue section of this project is only for submitting bugs that are clearly related to the BabelDOC core, with complete reproduction steps and relevant logs attached.** Otherwise, issues will be closed directly.
27
+ required: true
26
28
 
27
29
  - type: markdown
28
30
  attributes:
@@ -33,6 +35,12 @@ body:
33
35
  Please also note:
34
36
  - If you are using a downstream project like pdf2zh-next, please submit an issue directly to the downstream application. Only when you confirm that this issue is a problem with the core library of BabelDOC, submit this issue.
35
37
  - The CLI is only used for debugging purposes, we do not provide any technical support for CLI usage.
38
+
39
+ - type: markdown
40
+ attributes:
41
+ value: |
42
+ Please note! Users of immersive translate online services should contact customer service and provide their translation ID. **Feedback related to online services is not handled here.**
43
+
36
44
  - type: textarea
37
45
  id: environment
38
46
  attributes:
@@ -58,7 +66,7 @@ body:
58
66
  id: reproduce
59
67
  attributes:
60
68
  label: Steps to Reproduce
61
- description: Help us reproduce the issue
69
+ description: Help us reproduce the issue. Issues that do not provide reproduction steps will be closed directly.
62
70
  value: |
63
71
  1. Go to '...'
64
72
  2. Click on '...'
@@ -55,7 +55,7 @@ jobs:
55
55
  # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
56
56
  steps:
57
57
  - name: Checkout repository
58
- uses: actions/checkout@v5
58
+ uses: actions/checkout@v6
59
59
 
60
60
  # Initializes the CodeQL tools for scanning.
61
61
  - name: Initialize CodeQL
@@ -9,7 +9,7 @@ jobs:
9
9
  deploy:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
- - uses: actions/checkout@v5
12
+ - uses: actions/checkout@v6
13
13
  with:
14
14
  fetch-depth: 0
15
15
  - name: Configure Git Credentials
@@ -24,7 +24,7 @@ jobs:
24
24
  cache-dependency-glob: "uv.lock"
25
25
  activate-environment: true
26
26
  - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
27
- - uses: actions/cache@v4
27
+ - uses: actions/cache@v5
28
28
  with:
29
29
  key: mkdocs-material-${{ env.cache_id }}
30
30
  path: .cache
@@ -22,10 +22,10 @@ jobs:
22
22
  runs-on: ubuntu-latest
23
23
  steps:
24
24
  - name: Check out the repository
25
- uses: actions/checkout@v5
25
+ uses: actions/checkout@v6
26
26
 
27
27
  - name: Run Labeler
28
- uses: crazy-max/ghaction-github-labeler@24d110aa46a59976b8a7f35518cb7f14f434c916 # v5.3.0
28
+ uses: crazy-max/ghaction-github-labeler@548a7c3603594ec17c819e1239f281a3b801ab4d # v6.0.0
29
29
  with:
30
30
  skip-delete: true
31
31
  dry-run: ${{ github.event_name == 'pull_request' }}
@@ -10,7 +10,7 @@ jobs:
10
10
  fail-fast: false
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
- - uses: actions/checkout@v5
13
+ - uses: actions/checkout@v6
14
14
  - name: Ruff
15
15
  uses: astral-sh/ruff-action@v3
16
16
  - name: AutoCorrect
@@ -9,7 +9,7 @@ jobs:
9
9
  name: runner / ruff
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
- - uses: actions/checkout@v5
12
+ - uses: actions/checkout@v6
13
13
 
14
14
  - name: Install Python
15
15
  uses: actions/setup-python@v6
@@ -20,7 +20,7 @@ jobs:
20
20
  run: pip install ruff
21
21
 
22
22
  - name: Install reviewdog
23
- uses: reviewdog/action-setup@d8edfce3dd5e1ec6978745e801f9c50b5ef80252 # v1.4.0
23
+ uses: reviewdog/action-setup@d8a7baabd7f3e8544ee4dbde3ee41d0011c3a93f # v1.5.0
24
24
  with:
25
25
  reviewdog_version: latest
26
26
 
@@ -34,7 +34,7 @@ jobs:
34
34
  name: runner / autocorrect
35
35
  runs-on: ubuntu-latest
36
36
  steps:
37
- - uses: actions/checkout@v5
37
+ - uses: actions/checkout@v6
38
38
  - name: AutoCorrect
39
39
  uses: huacnlee/autocorrect-action@bf91ab3904c2908dd8e71312a8a83ed1eb632997 # v2.13.3
40
40
  - name: Report ReviewDog
@@ -28,7 +28,7 @@ jobs:
28
28
  outputs:
29
29
  is_release: ${{ steps.check-version.outputs.tag }}
30
30
  steps:
31
- - uses: actions/checkout@v5
31
+ - uses: actions/checkout@v6
32
32
  with:
33
33
  persist-credentials: true
34
34
  fetch-depth: 2
@@ -69,7 +69,7 @@ jobs:
69
69
  run: "uv build"
70
70
 
71
71
  - name: Store the distribution packages
72
- uses: actions/upload-artifact@v4.6.2
72
+ uses: actions/upload-artifact@v7.0.0
73
73
  with:
74
74
  name: python-package-distributions
75
75
  path: dist/
@@ -139,7 +139,7 @@ jobs:
139
139
  contents: write
140
140
  pull-requests: write
141
141
  steps:
142
- - uses: actions/checkout@v5
142
+ - uses: actions/checkout@v6
143
143
  with:
144
144
  persist-credentials: true
145
145
  fetch-depth: 2
@@ -18,12 +18,12 @@ jobs:
18
18
  python-version: ["3.10", "3.11", "3.12", "3.13"]
19
19
 
20
20
  steps:
21
- - uses: actions/checkout@v5
21
+ - uses: actions/checkout@v6
22
22
  with:
23
23
  persist-credentials: false
24
24
  - name: Cached Assets
25
25
  id: cache-assets
26
- uses: actions/cache@v4.2.0
26
+ uses: actions/cache@v5
27
27
  with:
28
28
  path: ~/.cache/babeldoc
29
29
  key: babeldoc-assets-${{ hashFiles('babeldoc/assets/embedding_assets_metadata.py') }}
@@ -47,3 +47,4 @@ CLAUDE.md
47
47
  babeldoc/format/playground
48
48
  temp.jpg
49
49
  AGENTS.md
50
+ .serena
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BabelDOC
3
- Version: 0.5.22
3
+ Version: 0.5.24
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
@@ -21,6 +21,7 @@ Requires-Dist: freetype-py>=2.5.1
21
21
  Requires-Dist: httpx[socks]>=0.27.0
22
22
  Requires-Dist: huggingface-hub>=0.27.0
23
23
  Requires-Dist: hyperscan>=0.7.13
24
+ Requires-Dist: levenshtein>=0.27.1
24
25
  Requires-Dist: msgpack>=1.1.0
25
26
  Requires-Dist: numpy>=2.0.2
26
27
  Requires-Dist: onnx>=1.18.0
@@ -32,7 +33,6 @@ Requires-Dist: peewee>=3.17.8
32
33
  Requires-Dist: psutil>=7.0.0
33
34
  Requires-Dist: pydantic>=2.10.6
34
35
  Requires-Dist: pymupdf>=1.25.1
35
- Requires-Dist: python-levenshtein>=0.27.1
36
36
  Requires-Dist: pyzstd>=0.17.0
37
37
  Requires-Dist: rapidocr-onnxruntime>=1.4.4
38
38
  Requires-Dist: rich>=13.9.4
@@ -251,6 +251,7 @@ uv run babeldoc --files example.pdf --files example2.pdf --openai --openai-model
251
251
  - `--openai`: Use OpenAI for translation (default: False)
252
252
  - `--custom-system-prompt`: Custom system prompt for translation.
253
253
  - `--add-formula-placehold-hint`: Add formula placeholder hint for translation. (Currently not recommended, it may affect translation quality, default: False)
254
+ - `--disable-same-text-fallback`: Disable fallback translation when LLM output matches input text. (default: False)
254
255
  - `--pool-max-workers`: Maximum number of worker threads for internal task processing pools. If not specified, defaults to QPS value. This parameter directly sets the worker count, replacing previous QPS-based dynamic calculations.
255
256
  - `--no-auto-extract-glossary`: Disable automatic term extraction. If this flag is present, the step is skipped. Defaults to enabled.
256
257
 
@@ -361,6 +362,7 @@ openai-model = "gpt-4o-mini"
361
362
  openai-base-url = "https://api.openai.com/v1"
362
363
  openai-api-key = "your-api-key-here"
363
364
  enable-json-mode-if-requested = false # Enable JSON mode when requested (default: false)
365
+ disable_same_text_fallback = false # Disable fallback translation when LLM output matches input text (default: false)
364
366
  pool-max-workers = 8 # Maximum worker threads for task processing (defaults to QPS value if not set)
365
367
 
366
368
  # Glossary Options (Optional)
@@ -195,6 +195,7 @@ uv run babeldoc --files example.pdf --files example2.pdf --openai --openai-model
195
195
  - `--openai`: Use OpenAI for translation (default: False)
196
196
  - `--custom-system-prompt`: Custom system prompt for translation.
197
197
  - `--add-formula-placehold-hint`: Add formula placeholder hint for translation. (Currently not recommended, it may affect translation quality, default: False)
198
+ - `--disable-same-text-fallback`: Disable fallback translation when LLM output matches input text. (default: False)
198
199
  - `--pool-max-workers`: Maximum number of worker threads for internal task processing pools. If not specified, defaults to QPS value. This parameter directly sets the worker count, replacing previous QPS-based dynamic calculations.
199
200
  - `--no-auto-extract-glossary`: Disable automatic term extraction. If this flag is present, the step is skipped. Defaults to enabled.
200
201
 
@@ -305,6 +306,7 @@ openai-model = "gpt-4o-mini"
305
306
  openai-base-url = "https://api.openai.com/v1"
306
307
  openai-api-key = "your-api-key-here"
307
308
  enable-json-mode-if-requested = false # Enable JSON mode when requested (default: false)
309
+ disable_same_text_fallback = false # Disable fallback translation when LLM output matches input text (default: false)
308
310
  pool-max-workers = 8 # Maximum worker threads for task processing (defaults to QPS value if not set)
309
311
 
310
312
  # Glossary Options (Optional)
@@ -0,0 +1 @@
1
+ __version__ = "0.5.24"
@@ -6,7 +6,7 @@ import subprocess
6
6
  import threading
7
7
  from pathlib import Path
8
8
 
9
- __version__ = "0.5.22"
9
+ __version__ = "0.5.24"
10
10
 
11
11
  CACHE_FOLDER = Path.home() / ".cache" / "babeldoc"
12
12
 
@@ -37,6 +37,8 @@ os_name = platform.system()
37
37
 
38
38
 
39
39
  class OnnxModel(DocLayoutModel):
40
+ _FIXED_IMGSZ = 1024 # fixed input size for static-shape CoreML
41
+
40
42
  def __init__(self, model_path: str):
41
43
  self.model_path = model_path
42
44
 
@@ -47,18 +49,52 @@ class OnnxModel(DocLayoutModel):
47
49
  providers = []
48
50
 
49
51
  available_providers = onnxruntime.get_available_providers()
50
- for provider in available_providers:
51
- # disable dml|cuda|
52
- # directml/cuda may encounter problems under special circumstances
53
- if re.match(r"cpu", provider, re.IGNORECASE):
54
- logger.info(f"Available Provider: {provider}")
55
- providers.append(provider)
52
+ use_coreml = os_name == "Darwin" and any(
53
+ re.match(r"coreml", p, re.IGNORECASE) for p in available_providers
54
+ )
55
+ if use_coreml:
56
+ # Fix input shapes to [1, 3, 1024, 1024] so CoreML can take over
57
+ # 96%+ of the graph nodes (658/681) instead of just 3/823.
58
+ model = self._make_static_model(model, self._FIXED_IMGSZ)
59
+ providers = [
60
+ "CoreMLExecutionProvider",
61
+ "CPUExecutionProvider",
62
+ ]
63
+ logger.info(
64
+ "Using CoreMLExecutionProvider with static input "
65
+ f"[1, 3, {self._FIXED_IMGSZ}, {self._FIXED_IMGSZ}]"
66
+ )
67
+ else:
68
+ for provider in available_providers:
69
+ # disable dml|cuda|
70
+ # directml/cuda may encounter problems under special circumstances
71
+ if re.match(r"cpu", provider, re.IGNORECASE):
72
+ logger.info(f"Available Provider: {provider}")
73
+ providers.append(provider)
56
74
  self.model = onnxruntime.InferenceSession(
57
75
  model.SerializeToString(),
58
76
  providers=providers,
59
77
  )
60
78
  self.lock = threading.Lock()
61
79
 
80
+ @staticmethod
81
+ def _make_static_model(model, imgsz):
82
+ """Rewrite dynamic input dims to fixed [1, 3, imgsz, imgsz] and run
83
+ shape inference so all intermediate shapes become static."""
84
+ from onnx import shape_inference
85
+
86
+ for inp in model.graph.input:
87
+ if inp.name == "images":
88
+ dim = inp.type.tensor_type.shape.dim
89
+ for i, val in enumerate([1, 3, imgsz, imgsz]):
90
+ dim[i].ClearField("dim_param")
91
+ dim[i].dim_value = val
92
+ try:
93
+ model = shape_inference.infer_shapes(model)
94
+ except Exception:
95
+ pass # best-effort; CoreML still benefits from fixed input
96
+ return model
97
+
62
98
  @staticmethod
63
99
  def from_pretrained():
64
100
  pth = get_doclayout_onnx_model_path()
@@ -97,9 +133,9 @@ class OnnxModel(DocLayoutModel):
97
133
  interpolation=cv2.INTER_LINEAR,
98
134
  )
99
135
 
100
- # Calculate padding size and align to stride multiple
101
- pad_w = (new_w - resized_w) % self.stride
102
- pad_h = (new_h - resized_h) % self.stride
136
+ # Pad to full target size (enables static-shape CoreML acceleration)
137
+ pad_w = new_w - resized_w
138
+ pad_h = new_h - resized_h
103
139
  top, bottom = pad_h // 2, pad_h - pad_h // 2
104
140
  left, right = pad_w // 2, pad_w - pad_w // 2
105
141
 
@@ -43,8 +43,12 @@ def get_descendant_fonts(doc, xref):
43
43
  def get_glyph_bbox(face, g):
44
44
  try:
45
45
  face.load_glyph(g, freetype.FT_LOAD_NO_SCALE)
46
- cbox = face.glyph.outline.get_bbox()
47
- return cbox.xMin, cbox.yMin, cbox.xMax, cbox.yMax
46
+ outline = face.glyph.outline
47
+ if outline.contours:
48
+ cbox = outline.get_bbox()
49
+ return cbox.xMin, cbox.yMin, cbox.xMax, cbox.yMax
50
+ else:
51
+ return 0, 0, 0, 0
48
52
  except Exception:
49
53
  return 0, 0, 0, 0
50
54
 
@@ -0,0 +1,41 @@
1
+ import io
2
+ import re
3
+
4
+ import pymupdf
5
+
6
+
7
+ def merge_bbox(bbox_list, factor=1):
8
+ if bbox_list:
9
+ base = bbox_list[0]
10
+ for bbox in bbox_list[1:]:
11
+ base.include_rect(bbox)
12
+ x0, y0, x1, y1 = [v / factor for v in tuple(base)]
13
+ return x0, -y1, x1, -y0
14
+
15
+
16
+ def get_type3_bbox(doc, obj):
17
+ bbox_list = [(0, 0, 0, 0)] * 256
18
+ first = int(doc.xref_get_key(obj, "FirstChar")[1])
19
+ last = int(doc.xref_get_key(obj, "LastChar")[1])
20
+ factor_text = doc.xref_get_key(obj, "FontMatrix")[1]
21
+ factor = 1
22
+ if factor_m := re.search(r"(\d+)?\.\d+", factor_text):
23
+ factor = float(factor_m.group(0))
24
+ page = doc.new_page(width=10, height=10)
25
+ doc.xref_set_key(page.xref, "Resources", "<<>>")
26
+ doc.xref_set_key(page.xref, "Resources/Font", f"<</T0 {obj} 0 R>>")
27
+ text = doc.get_new_xref()
28
+ doc.update_object(text, "<<>>")
29
+ for x in range(first, last + 1):
30
+ doc.update_stream(text, b"1 0 0 1 0 10 cm BT /T0 1 Tf <%02X> Tj ET" % x)
31
+ doc.xref_set_key(page.xref, "Contents", f"{text} 0 R")
32
+ char_data = page.get_svg_image(text_as_path=True)
33
+ char_doc = pymupdf.Document(stream=io.BytesIO(char_data.encode("U8")))
34
+ char_bbox = []
35
+ for element in char_doc:
36
+ for item in element.get_drawings():
37
+ char_bbox.append(item["rect"])
38
+ if char_bbox_merged := merge_bbox(char_bbox, factor):
39
+ bbox_list[x] = char_bbox_merged
40
+ doc.delete_page(-1)
41
+ return bbox_list
@@ -485,10 +485,13 @@ def reproduce_cmap(doc):
485
485
  assert doc
486
486
  font_set = set()
487
487
  for page in doc:
488
- font_list = page.get_fonts()
489
- for font in font_list:
490
- if font[1] == "ttf" and font[3] in FONT_NAMES and ".ttf" in font[4]:
491
- font_set.add(font)
488
+ try:
489
+ font_list = page.get_fonts()
490
+ for font in font_list:
491
+ if font[1] == "ttf" and font[3] in FONT_NAMES and ".ttf" in font[4]:
492
+ font_set.add(font)
493
+ except Exception as e:
494
+ logger.error(f"Error in getting page fonts: {e}")
492
495
  for font in font_set:
493
496
  reproduce_one_font(doc, font[0])
494
497
  return doc
@@ -1399,7 +1402,7 @@ class PDFCreater:
1399
1402
  auto_extracted_glossary_path = self.translation_config.get_output_file_path(
1400
1403
  f"{basename}{debug_suffix}.{translation_config.lang_out}.glossary.csv"
1401
1404
  )
1402
- with auto_extracted_glossary_path.open("w", encoding="utf-8") as f:
1405
+ with auto_extracted_glossary_path.open("w", encoding="utf-8-sig") as f:
1403
1406
  logger.info(
1404
1407
  f"save auto extracted glossary to {auto_extracted_glossary_path}"
1405
1408
  )
@@ -15,8 +15,10 @@ import tiktoken
15
15
  import babeldoc.pdfminer.pdfinterp
16
16
  from babeldoc.format.pdf.babelpdf.base14 import get_base14_bbox
17
17
  from babeldoc.format.pdf.babelpdf.cidfont import get_cidfont_bbox
18
+ from babeldoc.format.pdf.babelpdf.cidfont import get_glyph_bbox
18
19
  from babeldoc.format.pdf.babelpdf.encoding import WinAnsiEncoding
19
20
  from babeldoc.format.pdf.babelpdf.encoding import get_type1_encoding
21
+ from babeldoc.format.pdf.babelpdf.type3 import get_type3_bbox
20
22
  from babeldoc.format.pdf.babelpdf.utils import guarded_bbox
21
23
  from babeldoc.format.pdf.document_il import il_version_1
22
24
  from babeldoc.format.pdf.document_il.utils import zstd_helper
@@ -111,15 +113,9 @@ def indirect(obj):
111
113
  return int(obj[1].split(" ")[0])
112
114
 
113
115
 
114
- def get_glyph_cbox(face, g):
115
- face.load_glyph(g, freetype.FT_LOAD_NO_SCALE)
116
- cbox = face.glyph.outline.get_bbox()
117
- return cbox.xMin, cbox.yMin, cbox.xMax, cbox.yMax
118
-
119
-
120
116
  def get_char_cbox(face, idx):
121
117
  g = face.get_char_index(idx)
122
- return get_glyph_cbox(face, g)
118
+ return get_glyph_bbox(face, g)
123
119
 
124
120
 
125
121
  def get_name_cbox(face, name):
@@ -127,7 +123,7 @@ def get_name_cbox(face, name):
127
123
  if isinstance(name, str):
128
124
  name = name.encode("utf-8")
129
125
  g = face.get_name_index(name)
130
- return get_glyph_cbox(face, g)
126
+ return get_glyph_bbox(face, g)
131
127
  return (0, 0, 0, 0)
132
128
 
133
129
 
@@ -798,6 +794,8 @@ class ILCreater:
798
794
  bbox_list = get_base14_bbox(obj_val[1:])
799
795
  if cid_bbox := get_cidfont_bbox(self.mupdf, xobj_id):
800
796
  bbox_list = cid_bbox
797
+ if self.mupdf.xref_get_key(xobj_id, "Subtype")[1] == "/Type3":
798
+ bbox_list = get_type3_bbox(self.mupdf, xobj_id)
801
799
  return bbox_list, cmap
802
800
 
803
801
  def create_graphic_state(
@@ -413,7 +413,7 @@ class AutomaticTermExtractor:
413
413
  "auto_extractor_glossary.csv"
414
414
  )
415
415
  logger.debug(f"save auto extracted glossary to {path}")
416
- with Path(path).open("w", encoding="utf-8") as f:
416
+ with Path(path).open("w", encoding="utf-8-sig") as f:
417
417
  auto_extracted_glossary = self.shared_context.auto_extracted_glossary
418
418
  if auto_extracted_glossary:
419
419
  f.write(auto_extracted_glossary.to_csv())
@@ -761,7 +761,12 @@ class ILTranslatorLLMOnly:
761
761
  input_token_count = self.calc_token_count(trimed_input)
762
762
  output_token_count = self.calc_token_count(output_unicode)
763
763
 
764
- if trimed_input == output_unicode and input_token_count > 10:
764
+ same_as_input = trimed_input == output_unicode
765
+ if (
766
+ same_as_input
767
+ and input_token_count > 10
768
+ and not self.translation_config.disable_same_text_fallback
769
+ ):
765
770
  llm_translate_tracker.set_error_message(
766
771
  "Translation result is the same as input, fallback."
767
772
  )
@@ -781,16 +786,19 @@ class ILTranslatorLLMOnly:
781
786
  llm_translate_tracker.set_placeholder_full_match()
782
787
  continue
783
788
 
784
- edit_distance = Levenshtein.distance(input_unicode, output_unicode)
785
- if edit_distance < 5 and input_token_count > 20:
786
- llm_translate_tracker.set_error_message(
787
- f"Translation result edit distance is too small. distance: {edit_distance}, input: {input_unicode}, output: {output_unicode}"
788
- )
789
- logger.warning(
790
- f"Translation result edit distance is too small. distance: {edit_distance}, input: {input_unicode}, output: {output_unicode}"
789
+ if not self.translation_config.disable_same_text_fallback:
790
+ edit_distance = Levenshtein.distance(
791
+ input_unicode, output_unicode
791
792
  )
792
- llm_translate_tracker.set_placeholder_full_match()
793
- continue
793
+ if edit_distance < 5 and input_token_count > 20:
794
+ llm_translate_tracker.set_error_message(
795
+ f"Translation result edit distance is too small. distance: {edit_distance}, input: {input_unicode}, output: {output_unicode}"
796
+ )
797
+ logger.warning(
798
+ f"Translation result edit distance is too small. distance: {edit_distance}, input: {input_unicode}, output: {output_unicode}"
799
+ )
800
+ llm_translate_tracker.set_placeholder_full_match()
801
+ continue
794
802
  # Apply the translation to the paragraph
795
803
  self.il_translator.post_translate_paragraph(
796
804
  inputs[id_][2],
@@ -135,7 +135,7 @@ class ResultMerger:
135
135
  auto_extracted_glossary_path = self.config.get_output_file_path(
136
136
  f"{basename}{debug_suffix}.{self.config.lang_out}.glossary.csv"
137
137
  )
138
- with auto_extracted_glossary_path.open("w", encoding="utf-8") as f:
138
+ with auto_extracted_glossary_path.open("w", encoding="utf-8-sig") as f:
139
139
  logger.info(
140
140
  f"save auto extracted glossary to {auto_extracted_glossary_path}"
141
141
  )
@@ -199,6 +199,7 @@ class TranslationConfig:
199
199
  term_extraction_translator: BaseTranslator | None = None,
200
200
  metadata_extra_data: str | None = None,
201
201
  term_pool_max_workers: int | None = None,
202
+ disable_same_text_fallback: bool = False,
202
203
  ):
203
204
  self.translator = translator
204
205
  self.term_extraction_translator = term_extraction_translator or translator
@@ -354,6 +355,7 @@ class TranslationConfig:
354
355
  "completion_tokens": 0,
355
356
  "cache_hit_prompt_tokens": 0,
356
357
  }
358
+ self.disable_same_text_fallback = disable_same_text_fallback
357
359
 
358
360
  if self.ocr_workaround:
359
361
  self.remove_non_formula_lines = False
@@ -26,7 +26,7 @@ from babeldoc.translator.translator import OpenAITranslator
26
26
  from babeldoc.translator.translator import set_translate_rate_limiter
27
27
 
28
28
  logger = logging.getLogger(__name__)
29
- __version__ = "0.5.22"
29
+ __version__ = "0.5.24"
30
30
 
31
31
 
32
32
  def create_parser():
@@ -269,6 +269,12 @@ def create_parser():
269
269
  default=False,
270
270
  help="Add formula placeholder hint for translation. (Currently not recommended, it may affect translation quality, default: False)",
271
271
  )
272
+ translation_group.add_argument(
273
+ "--disable-same-text-fallback",
274
+ action="store_true",
275
+ default=False,
276
+ help="Disable fallback translation when LLM output matches input text. (default: False)",
277
+ )
272
278
  translation_group.add_argument(
273
279
  "--glossary-files",
274
280
  type=str,
@@ -703,6 +709,7 @@ async def main():
703
709
  custom_system_prompt=args.custom_system_prompt,
704
710
  working_dir=working_dir,
705
711
  add_formula_placehold_hint=args.add_formula_placehold_hint,
712
+ disable_same_text_fallback=args.disable_same_text_fallback,
706
713
  glossaries=loaded_glossaries,
707
714
  pool_max_workers=args.pool_max_workers,
708
715
  auto_extract_glossary=args.auto_extract_glossary,
@@ -344,9 +344,15 @@ class OpenAITranslator(BaseTranslator):
344
344
  self.prompt_token_count.inc(response.usage.prompt_tokens)
345
345
  if response.usage and response.usage.completion_tokens:
346
346
  self.completion_token_count.inc(response.usage.completion_tokens)
347
- if response.usage and (
348
- hit_count := getattr(response.usage, "prompt_cache_hit_tokens", 0)
347
+ # Support both response.usage.prompt_cache_hit_tokens and response.prompt_tokens_details.cached_tokens
348
+ hit_count = 0
349
+ if response.usage and hasattr(response.usage, "prompt_cache_hit_tokens"):
350
+ hit_count = getattr(response.usage, "prompt_cache_hit_tokens", 0)
351
+ if hasattr(response, "prompt_tokens_details") and getattr(
352
+ response.prompt_tokens_details, "cached_tokens", 0
349
353
  ):
354
+ hit_count += getattr(response.prompt_tokens_details, "cached_tokens", 0)
355
+ if hit_count:
350
356
  self.cache_hit_prompt_token_count.inc(hit_count)
351
357
  except Exception as e:
352
358
  logger.exception("Error updating token count")
@@ -46,6 +46,12 @@ Please pay special attention to:
46
46
  >
47
47
  > Due to the current high rate of code changes, this project only accepts small PRs. If you would like to suggest a change and you include a patch as a proof-of-concept, that would be great. However, please do not be offended if we rewrite your patch from scratch.
48
48
  >
49
+ > In addition, we do not accept PRs involving the following changes:
50
+ > 1. PRs that modify prompts.
51
+ > 2. Adding GUI or other features directly targeting end users to this project. (Exceptions granted by maintainers in issues are excluded.)
52
+ > 3. PRs that do not comply with this specification.
53
+ > 4. Other PRs that maintainers deem inappropriate.
54
+ >
49
55
  > **This project cannot accept all PRs. We recommend that you discuss with the maintainers via [Issue](https://github.com/funstory-ai/BabelDOC/issues) before submitting a PR.**
50
56
 
51
57
  [//]: # (> We welcome pull requests and will review your contributions.)
@@ -30,6 +30,7 @@ site_description: >-
30
30
  repo_name: funstory-ai/BabelDOC
31
31
  repo_url: https://github.com/funstory-ai/BabelDOC
32
32
  edit_uri: edit/main/docs/
33
+ docs_dir: docs
33
34
 
34
35
  # Copyright
35
36
  copyright: Copyright &copy; 2025 funstory.ai
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "BabelDOC"
3
- version = "0.5.22"
3
+ version = "0.5.24"
4
4
  description = "Yet Another Document Translator"
5
5
  license = "AGPL-3.0"
6
6
  readme = "README.md"
@@ -42,7 +42,7 @@ dependencies = [
42
42
  "scikit-image>=0.25.2",
43
43
  "freetype-py>=2.5.1",
44
44
  "tiktoken>=0.9.0",
45
- "python-levenshtein>=0.27.1",
45
+ "Levenshtein>=0.27.1",
46
46
  "opencv-python-headless>=4.10.0.84",
47
47
  "rapidocr-onnxruntime>=1.4.4",
48
48
  "pyzstd>=0.17.0",
@@ -162,7 +162,7 @@ pythonpath = [".", "src"]
162
162
  testpaths = ["tests"]
163
163
 
164
164
  [bumpver]
165
- current_version = "0.5.22"
165
+ current_version = "0.5.24"
166
166
  version_pattern = "MAJOR.MINOR.PATCH[.PYTAGNUM]"
167
167
 
168
168
  [bumpver.file_patterns]
@@ -1,2 +0,0 @@
1
- # Project notes and templates
2
- xnotes/
@@ -1 +0,0 @@
1
- __version__ = "0.5.22"
File without changes