BabelDOC 0.2.7__tar.gz → 0.2.8__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.2.7 → babeldoc-0.2.8}/PKG-INFO +10 -2
- {babeldoc-0.2.7 → babeldoc-0.2.8}/README.md +6 -0
- babeldoc-0.2.8/babeldoc/__init__.py +1 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/const.py +1 -1
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/il_translator.py +1 -1
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/translator/translator.py +34 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/docvision/doclayout.py +11 -2
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/main.py +4 -1
- {babeldoc-0.2.7 → babeldoc-0.2.8}/pyproject.toml +9 -3
- {babeldoc-0.2.7 → babeldoc-0.2.8}/uv.lock +11 -11
- babeldoc-0.2.7/babeldoc/__init__.py +0 -1
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.cursorignore +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/dependabot.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/labels.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/release-drafter.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/workflows/codeql.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/workflows/docs.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/workflows/labeler.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/workflows/publish-to-pypi.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.github/workflows/test.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.gitignore +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/.pre-commit-config.yaml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/LICENSE +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/assets/assets.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/assets/embedding_assets_metadata.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/asynchronize/__init__.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/converter.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/__init__.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/babeldoc_exception/BabelDOCException.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/backend/__init__.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/backend/pdf_creater.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/frontend/__init__.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/frontend/il_creater.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/il_version_1.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/il_version_1.rnc +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/il_version_1.rng +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/il_version_1.xsd +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/__init__.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/add_debug_information.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/detect_scanned_file.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/il_translator_llm_only.py +1 -1
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/layout_parser.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/paragraph_finder.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/remove_descent.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/styles_and_formulas.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/midend/typesetting.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/translator/__init__.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/translator/cache.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/utils/fontmap.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/utils/layout_helper.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/utils/style_helper.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/xml_converter.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/docvision/README.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/docvision/__init__.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/docvision/rpc_doclayout.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/high_level.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/pdfinterp.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/progress_monitor.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/tools/generate_font_metadata.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/translation_config.py +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/CODE_OF_CONDUCT.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/CONTRIBUTING.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/CONTRIBUTOR_REWARD.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/ILTranslator/ILTranslator.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/PDFCreation/PDFCreation.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/PDFParsing/PDFParsing.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/README.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/Typesetting/Typesetting.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/README.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/deploy.sh +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-banner.png +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.png +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-big-logo-darkmode-with-transparent-background.svg +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-big-logo-with-transparent-background.png +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-big-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-big-logo.png +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-contributor_reward_example.png +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-preview.gif +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-small-logo-with-transparent-background.png +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-small-logo-with-transparent-background.svg +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-small-logo.png +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/index.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/intro-to-pdf-object.md +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/docs/requirements.txt +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/mkdocs.yml +0 -0
- {babeldoc-0.2.7 → babeldoc-0.2.8}/tests/test_translation_config.py +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BabelDOC
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
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
|
|
7
|
+
Author-email: awwaawwa <aw@funstory.ai>
|
|
8
|
+
Maintainer-email: awwaawwa <aw@funstory.ai>
|
|
7
9
|
License-Expression: AGPL-3.0
|
|
8
10
|
License-File: LICENSE
|
|
9
11
|
Keywords: PDF
|
|
@@ -20,7 +22,7 @@ Requires-Dist: numpy>=2.0.2
|
|
|
20
22
|
Requires-Dist: onnx>=1.17.0
|
|
21
23
|
Requires-Dist: onnxruntime>=1.16.1
|
|
22
24
|
Requires-Dist: openai>=1.59.3
|
|
23
|
-
Requires-Dist: opencv-python>=4.10.0.84
|
|
25
|
+
Requires-Dist: opencv-python-headless>=4.10.0.84
|
|
24
26
|
Requires-Dist: orjson>=3.10.14
|
|
25
27
|
Requires-Dist: pdfminer-six>=20240706
|
|
26
28
|
Requires-Dist: peewee>=3.17.8
|
|
@@ -293,6 +295,12 @@ report-interval = 0.5
|
|
|
293
295
|
|
|
294
296
|
## Python API
|
|
295
297
|
|
|
298
|
+
> [!TIP]
|
|
299
|
+
>
|
|
300
|
+
> 1. Before pdf2zh 2.0 is released, you can temporarily use BabelDOC's Python API. However, after pdf2zh 2.0 is released, please directly use pdf2zh's Python API.
|
|
301
|
+
>
|
|
302
|
+
> 2. This project's Python API does not guarantee any compatibility. However, the Python API from pdf2zh will guarantee a certain level of compatibility.
|
|
303
|
+
|
|
296
304
|
You can refer to the example in [main.py](https://github.com/funstory-ai/yadt/blob/main/babeldoc/main.py) to use BabelDOC's Python API.
|
|
297
305
|
|
|
298
306
|
Please note:
|
|
@@ -255,6 +255,12 @@ report-interval = 0.5
|
|
|
255
255
|
|
|
256
256
|
## Python API
|
|
257
257
|
|
|
258
|
+
> [!TIP]
|
|
259
|
+
>
|
|
260
|
+
> 1. Before pdf2zh 2.0 is released, you can temporarily use BabelDOC's Python API. However, after pdf2zh 2.0 is released, please directly use pdf2zh's Python API.
|
|
261
|
+
>
|
|
262
|
+
> 2. This project's Python API does not guarantee any compatibility. However, the Python API from pdf2zh will guarantee a certain level of compatibility.
|
|
263
|
+
|
|
258
264
|
You can refer to the example in [main.py](https://github.com/funstory-ai/yadt/blob/main/babeldoc/main.py) to use BabelDOC's Python API.
|
|
259
265
|
|
|
260
266
|
Please note:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.8"
|
|
@@ -603,7 +603,7 @@ class ILTranslator:
|
|
|
603
603
|
)
|
|
604
604
|
except Exception as e:
|
|
605
605
|
logger.exception(
|
|
606
|
-
f"Error translating paragraph. Paragraph: {paragraph}. Error: {e}. ",
|
|
606
|
+
f"Error translating paragraph. Paragraph: {paragraph.debug_id} ({paragraph.unicode}). Error: {e}. ",
|
|
607
607
|
)
|
|
608
608
|
# ignore error and continue
|
|
609
609
|
return
|
|
@@ -62,6 +62,31 @@ def set_translate_rate_limiter(max_qps):
|
|
|
62
62
|
_translate_rate_limiter.set_max_qps(max_qps)
|
|
63
63
|
|
|
64
64
|
|
|
65
|
+
class AtomicInteger:
|
|
66
|
+
def __init__(self, value=0):
|
|
67
|
+
self._value = int(value)
|
|
68
|
+
self._lock = threading.Lock()
|
|
69
|
+
|
|
70
|
+
def inc(self, d=1):
|
|
71
|
+
with self._lock:
|
|
72
|
+
self._value += int(d)
|
|
73
|
+
return self._value
|
|
74
|
+
|
|
75
|
+
def dec(self, d=1):
|
|
76
|
+
return self.inc(-d)
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def value(self):
|
|
80
|
+
with self._lock:
|
|
81
|
+
return self._value
|
|
82
|
+
|
|
83
|
+
@value.setter
|
|
84
|
+
def value(self, v):
|
|
85
|
+
with self._lock:
|
|
86
|
+
self._value = int(v)
|
|
87
|
+
return self._value
|
|
88
|
+
|
|
89
|
+
|
|
65
90
|
class BaseTranslator(ABC):
|
|
66
91
|
# Due to cache limitations, name should be within 20 characters.
|
|
67
92
|
# cache.py: translate_engine = CharField(max_length=20)
|
|
@@ -195,6 +220,9 @@ class OpenAITranslator(BaseTranslator):
|
|
|
195
220
|
self.model = model
|
|
196
221
|
self.add_cache_impact_parameters("model", self.model)
|
|
197
222
|
self.add_cache_impact_parameters("prompt", self.prompt(""))
|
|
223
|
+
self.token_count = AtomicInteger()
|
|
224
|
+
self.prompt_token_count = AtomicInteger()
|
|
225
|
+
self.completion_token_count = AtomicInteger()
|
|
198
226
|
|
|
199
227
|
@retry(
|
|
200
228
|
retry=retry_if_exception_type(openai.RateLimitError),
|
|
@@ -211,6 +239,9 @@ class OpenAITranslator(BaseTranslator):
|
|
|
211
239
|
**self.options,
|
|
212
240
|
messages=self.prompt(text),
|
|
213
241
|
)
|
|
242
|
+
self.token_count.inc(response.usage.total_tokens)
|
|
243
|
+
self.prompt_token_count.inc(response.usage.prompt_tokens)
|
|
244
|
+
self.completion_token_count.inc(response.usage.completion_tokens)
|
|
214
245
|
return response.choices[0].message.content.strip()
|
|
215
246
|
|
|
216
247
|
def prompt(self, text):
|
|
@@ -248,6 +279,9 @@ class OpenAITranslator(BaseTranslator):
|
|
|
248
279
|
},
|
|
249
280
|
],
|
|
250
281
|
)
|
|
282
|
+
self.token_count.inc(response.usage.total_tokens)
|
|
283
|
+
self.prompt_token_count.inc(response.usage.prompt_tokens)
|
|
284
|
+
self.completion_token_count.inc(response.usage.completion_tokens)
|
|
251
285
|
return response.choices[0].message.content.strip()
|
|
252
286
|
|
|
253
287
|
def get_formular_placeholder(self, placeholder_id: int):
|
|
@@ -6,8 +6,17 @@ from collections.abc import Generator
|
|
|
6
6
|
|
|
7
7
|
import cv2
|
|
8
8
|
import numpy as np
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
import onnx
|
|
12
|
+
import onnxruntime
|
|
13
|
+
except ImportError as e:
|
|
14
|
+
if "DLL load failed" in str(e):
|
|
15
|
+
raise OSError(
|
|
16
|
+
"Microsoft Visual C++ Redistributable is not installed. "
|
|
17
|
+
"Download it at https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
|
18
|
+
) from e
|
|
19
|
+
raise
|
|
11
20
|
import pymupdf
|
|
12
21
|
|
|
13
22
|
import babeldoc.document_il.il_version_1
|
|
@@ -22,7 +22,7 @@ from babeldoc.translation_config import TranslationConfig
|
|
|
22
22
|
from babeldoc.translation_config import WatermarkOutputMode
|
|
23
23
|
|
|
24
24
|
logger = logging.getLogger(__name__)
|
|
25
|
-
__version__ = "0.2.
|
|
25
|
+
__version__ = "0.2.8"
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def create_parser():
|
|
@@ -353,6 +353,9 @@ async def main():
|
|
|
353
353
|
result = event["translate_result"]
|
|
354
354
|
logger.info(str(result))
|
|
355
355
|
break
|
|
356
|
+
logger.info(f"Total tokens: {translator.token_count.value}")
|
|
357
|
+
logger.info(f"Prompt tokens: {translator.prompt_token_count.value}")
|
|
358
|
+
logger.info(f"Completion tokens: {translator.completion_token_count.value}")
|
|
356
359
|
|
|
357
360
|
|
|
358
361
|
def create_progress_handler(translation_config: TranslationConfig):
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "BabelDOC"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.8"
|
|
4
4
|
description = "Yet Another Document Translator"
|
|
5
5
|
license = "AGPL-3.0"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
requires-python = ">=3.10,<3.13"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "awwaawwa", email = "aw@funstory.ai" }
|
|
10
|
+
]
|
|
11
|
+
maintainers = [
|
|
12
|
+
{ name = "awwaawwa", email = "aw@funstory.ai" }
|
|
13
|
+
]
|
|
8
14
|
classifiers = [
|
|
9
15
|
"Programming Language :: Python :: 3",
|
|
10
16
|
"Operating System :: OS Independent",
|
|
@@ -19,7 +25,6 @@ dependencies = [
|
|
|
19
25
|
"onnx>=1.17.0",
|
|
20
26
|
"onnxruntime>=1.16.1",
|
|
21
27
|
"openai>=1.59.3",
|
|
22
|
-
"opencv-python>=4.10.0.84",
|
|
23
28
|
"orjson>=3.10.14",
|
|
24
29
|
"pdfminer-six>=20240706",
|
|
25
30
|
"peewee>=3.17.8",
|
|
@@ -35,6 +40,7 @@ dependencies = [
|
|
|
35
40
|
"freetype-py>=2.5.1",
|
|
36
41
|
"tiktoken>=0.9.0",
|
|
37
42
|
"python-levenshtein>=0.27.1",
|
|
43
|
+
"opencv-python-headless>=4.10.0.84",
|
|
38
44
|
]
|
|
39
45
|
|
|
40
46
|
[project.urls]
|
|
@@ -136,7 +142,7 @@ pythonpath = [".", "src"]
|
|
|
136
142
|
testpaths = ["tests"]
|
|
137
143
|
|
|
138
144
|
[bumpver]
|
|
139
|
-
current_version = "0.2.
|
|
145
|
+
current_version = "0.2.8"
|
|
140
146
|
version_pattern = "MAJOR.MINOR.PATCH[.PYTAGNUM]"
|
|
141
147
|
|
|
142
148
|
[bumpver.file_patterns]
|
|
@@ -48,7 +48,7 @@ wheels = [
|
|
|
48
48
|
|
|
49
49
|
[[package]]
|
|
50
50
|
name = "babeldoc"
|
|
51
|
-
version = "0.2.
|
|
51
|
+
version = "0.2.8"
|
|
52
52
|
source = { editable = "." }
|
|
53
53
|
dependencies = [
|
|
54
54
|
{ name = "bitstring" },
|
|
@@ -61,7 +61,7 @@ dependencies = [
|
|
|
61
61
|
{ name = "onnx" },
|
|
62
62
|
{ name = "onnxruntime" },
|
|
63
63
|
{ name = "openai" },
|
|
64
|
-
{ name = "opencv-python" },
|
|
64
|
+
{ name = "opencv-python-headless" },
|
|
65
65
|
{ name = "orjson" },
|
|
66
66
|
{ name = "pdfminer-six" },
|
|
67
67
|
{ name = "peewee" },
|
|
@@ -104,7 +104,7 @@ requires-dist = [
|
|
|
104
104
|
{ name = "onnx", specifier = ">=1.17.0" },
|
|
105
105
|
{ name = "onnxruntime", specifier = ">=1.16.1" },
|
|
106
106
|
{ name = "openai", specifier = ">=1.59.3" },
|
|
107
|
-
{ name = "opencv-python", specifier = ">=4.10.0.84" },
|
|
107
|
+
{ name = "opencv-python-headless", specifier = ">=4.10.0.84" },
|
|
108
108
|
{ name = "orjson", specifier = ">=3.10.14" },
|
|
109
109
|
{ name = "pdfminer-six", specifier = ">=20240706" },
|
|
110
110
|
{ name = "peewee", specifier = ">=3.17.8" },
|
|
@@ -1368,20 +1368,20 @@ wheels = [
|
|
|
1368
1368
|
]
|
|
1369
1369
|
|
|
1370
1370
|
[[package]]
|
|
1371
|
-
name = "opencv-python"
|
|
1371
|
+
name = "opencv-python-headless"
|
|
1372
1372
|
version = "4.11.0.86"
|
|
1373
1373
|
source = { registry = "https://pypi.org/simple" }
|
|
1374
1374
|
dependencies = [
|
|
1375
1375
|
{ name = "numpy" },
|
|
1376
1376
|
]
|
|
1377
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1377
|
+
sdist = { url = "https://files.pythonhosted.org/packages/36/2f/5b2b3ba52c864848885ba988f24b7f105052f68da9ab0e693cc7c25b0b30/opencv-python-headless-4.11.0.86.tar.gz", hash = "sha256:996eb282ca4b43ec6a3972414de0e2331f5d9cda2b41091a49739c19fb843798", size = 95177929 }
|
|
1378
1378
|
wheels = [
|
|
1379
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1380
|
-
{ url = "https://files.pythonhosted.org/packages/3b/
|
|
1381
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1382
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1383
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1384
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1379
|
+
{ url = "https://files.pythonhosted.org/packages/dc/53/2c50afa0b1e05ecdb4603818e85f7d174e683d874ef63a6abe3ac92220c8/opencv_python_headless-4.11.0.86-cp37-abi3-macosx_13_0_arm64.whl", hash = "sha256:48128188ade4a7e517237c8e1e11a9cdf5c282761473383e77beb875bb1e61ca", size = 37326460 },
|
|
1380
|
+
{ url = "https://files.pythonhosted.org/packages/3b/43/68555327df94bb9b59a1fd645f63fafb0762515344d2046698762fc19d58/opencv_python_headless-4.11.0.86-cp37-abi3-macosx_13_0_x86_64.whl", hash = "sha256:a66c1b286a9de872c343ee7c3553b084244299714ebb50fbdcd76f07ebbe6c81", size = 56723330 },
|
|
1381
|
+
{ url = "https://files.pythonhosted.org/packages/45/be/1438ce43ebe65317344a87e4b150865c5585f4c0db880a34cdae5ac46881/opencv_python_headless-4.11.0.86-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6efabcaa9df731f29e5ea9051776715b1bdd1845d7c9530065c7951d2a2899eb", size = 29487060 },
|
|
1382
|
+
{ url = "https://files.pythonhosted.org/packages/dd/5c/c139a7876099916879609372bfa513b7f1257f7f1a908b0bdc1c2328241b/opencv_python_headless-4.11.0.86-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e0a27c19dd1f40ddff94976cfe43066fbbe9dfbb2ec1907d66c19caef42a57b", size = 49969856 },
|
|
1383
|
+
{ url = "https://files.pythonhosted.org/packages/95/dd/ed1191c9dc91abcc9f752b499b7928aacabf10567bb2c2535944d848af18/opencv_python_headless-4.11.0.86-cp37-abi3-win32.whl", hash = "sha256:f447d8acbb0b6f2808da71fddd29c1cdd448d2bc98f72d9bb78a7a898fc9621b", size = 29324425 },
|
|
1384
|
+
{ url = "https://files.pythonhosted.org/packages/86/8a/69176a64335aed183529207ba8bc3d329c2999d852b4f3818027203f50e6/opencv_python_headless-4.11.0.86-cp37-abi3-win_amd64.whl", hash = "sha256:6c304df9caa7a6a5710b91709dd4786bf20a74d57672b3c31f7033cc638174ca", size = 39402386 },
|
|
1385
1385
|
]
|
|
1386
1386
|
|
|
1387
1387
|
[[package]]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.7 → babeldoc-0.2.8}/babeldoc/document_il/babeldoc_exception/BabelDOCException.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -328,9 +328,9 @@ class ILTranslatorLLMOnly:
|
|
|
328
328
|
translate_input,
|
|
329
329
|
translated_text,
|
|
330
330
|
)
|
|
331
|
+
should_fallback = False
|
|
331
332
|
if pbar:
|
|
332
333
|
pbar.advance(1)
|
|
333
|
-
should_fallback = False
|
|
334
334
|
except Exception as e:
|
|
335
335
|
logger.exception(f"Error translating paragraph. Error: {e}.")
|
|
336
336
|
# Ignore error and continue
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/AsyncTranslate/AsyncTranslate.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/ParagraphFinding/ParagraphFinding.md
RENAMED
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.7 → babeldoc-0.2.8}/docs/ImplementationDetails/StylesAndFormulas/StylesAndFormulas.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-big-logo-with-transparent-background.png
RENAMED
|
File without changes
|
{babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-big-logo-with-transparent-background.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-small-logo-with-transparent-background.png
RENAMED
|
File without changes
|
{babeldoc-0.2.7 → babeldoc-0.2.8}/docs/images/babeldoc-small-logo-with-transparent-background.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|