ndlocr-lite 2.0.0.dev0__py3-none-any.whl → 2.0.0.dev1__py3-none-any.whl
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.
- {ndlocr_lite-2.0.0.dev0.dist-info → ndlocr_lite-2.0.0.dev1.dist-info}/METADATA +1 -1
- {ndlocr_lite-2.0.0.dev0.dist-info → ndlocr_lite-2.0.0.dev1.dist-info}/RECORD +9 -9
- ocr.py +13 -3
- version.py +1 -1
- {ndlocr_lite-2.0.0.dev0.dist-info → ndlocr_lite-2.0.0.dev1.dist-info}/WHEEL +0 -0
- {ndlocr_lite-2.0.0.dev0.dist-info → ndlocr_lite-2.0.0.dev1.dist-info}/entry_points.txt +0 -0
- {ndlocr_lite-2.0.0.dev0.dist-info → ndlocr_lite-2.0.0.dev1.dist-info}/licenses/LICENCE +0 -0
- {ndlocr_lite-2.0.0.dev0.dist-info → ndlocr_lite-2.0.0.dev1.dist-info}/licenses/LICENCE_DEPENDENCEIES +0 -0
- {ndlocr_lite-2.0.0.dev0.dist-info → ndlocr_lite-2.0.0.dev1.dist-info}/top_level.txt +0 -0
|
@@ -2,17 +2,17 @@ cli.py,sha256=ii5r6_PD_VjiHZvD9dZa82rgLc8Z815R0EyDQaIah44,270
|
|
|
2
2
|
deim.py,sha256=b3YsjQnJbc-FDiZLTsZZFs_K0hjlMGulwWq_3MZEEGM,10289
|
|
3
3
|
model_download.py,sha256=hAiZvwx1TZGeqfskD67WKG7887g8a3wke5gP9Cu5Cjo,3100
|
|
4
4
|
ndl_parser.py,sha256=ooVhiTQ6sjsYf99ZElFt9G-oOCe2WthARHR5U-SvO_E,44587
|
|
5
|
-
ocr.py,sha256=
|
|
5
|
+
ocr.py,sha256=cEfbF-umuIQF074j5Xvt-Y03y__uhp0grNSLe3sTNVU,63725
|
|
6
6
|
parseq.py,sha256=QTfxKtc_YFCF_aMNUcHBRVYfhyFMX__ve9wgCSlnFJI,3480
|
|
7
7
|
pdf_output_utils.py,sha256=E_0see_1T5Qjy3nU1qXPQ6ywgVeiO8oMjKPauFMvVwo,2684
|
|
8
8
|
tcy_wrapper.py,sha256=l8P9P-vcSxK6FZrZcszdpI0F8QeekuYZzJK2U6wmdNE,8340
|
|
9
|
-
version.py,sha256=
|
|
9
|
+
version.py,sha256=LQ71x4qEkmo_WknOyRsNmvAHD9NeSY1sOZy4ungfcqk,69
|
|
10
10
|
config/NDLmoji.yaml,sha256=9q1aLeREtJUVWGavgRzxqYMJ3K4yJduAJ2fqUxotxSk,42434
|
|
11
11
|
config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
config/ndl.yaml,sha256=DNRXnfKfRIsQMuLWC6PiwWjK5Npaa2fOLfUtDbAQJ6I,876
|
|
13
13
|
model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
ndlocr_lite-2.0.0.
|
|
15
|
-
ndlocr_lite-2.0.0.
|
|
14
|
+
ndlocr_lite-2.0.0.dev1.dist-info/licenses/LICENCE,sha256=ElOOc8Sh4F_AwLddnU3mV_E52U68X0SwOoTMH3kzWPA,18653
|
|
15
|
+
ndlocr_lite-2.0.0.dev1.dist-info/licenses/LICENCE_DEPENDENCEIES,sha256=c79LuIx3wwLADnwjdGC-_0xjIZxzx1Idqw8vedyjJOY,105169
|
|
16
16
|
ndlocr_lite_gui/__init__.py,sha256=Pg_TOchl5n1dc6xx2cAj3-VuvPP2IshykgQAhaoguvc,345
|
|
17
17
|
ndlocr_lite_gui/gui_config.py,sha256=NY_5UGdNsnbOwezgS939NilDLCDdhYrn61IY9Hvgae0,447
|
|
18
18
|
ndlocr_lite_gui/main.py,sha256=m5ACwQzzs8yrvB3rPMny5ekBG31C1fF8YtQ-N4iQW78,114740
|
|
@@ -37,8 +37,8 @@ reading_order/xy_cut/eval.py,sha256=xCS4lU74RLRLsAZ0h7FdKchBq77IqqFKOt9B0twJ-mA,
|
|
|
37
37
|
tools/ndlkoten2tei.py,sha256=APe4RFUT5tRB0EUocruqLEeiYwmql2VWpu69giRqnnE,4414
|
|
38
38
|
uicomponent/localelabel.py,sha256=mexhHOkpNmYDupjY22pPb7los23NrIfyamZEVfLvS80,6852
|
|
39
39
|
uicomponent/textdaisy.py,sha256=LQzciOKDrSLSB3SpkJMi7EbcDg9TlBK0OnZL-vcCCxE,64622
|
|
40
|
-
ndlocr_lite-2.0.0.
|
|
41
|
-
ndlocr_lite-2.0.0.
|
|
42
|
-
ndlocr_lite-2.0.0.
|
|
43
|
-
ndlocr_lite-2.0.0.
|
|
44
|
-
ndlocr_lite-2.0.0.
|
|
40
|
+
ndlocr_lite-2.0.0.dev1.dist-info/METADATA,sha256=kZdxtVQTJhRb_evTKEXb43_XaucAGyxTRMUkK0dxcFM,14027
|
|
41
|
+
ndlocr_lite-2.0.0.dev1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
42
|
+
ndlocr_lite-2.0.0.dev1.dist-info/entry_points.txt,sha256=q_QL0nxp9HSmrxDUOzNizGWlLhp5pPx71iQylxjy6cQ,41
|
|
43
|
+
ndlocr_lite-2.0.0.dev1.dist-info/top_level.txt,sha256=ZW3SnW-5tJ9oonNJgEGhrv3k5cPr_0DsUObAoN__y-I,162
|
|
44
|
+
ndlocr_lite-2.0.0.dev1.dist-info/RECORD,,
|
ocr.py
CHANGED
|
@@ -1448,8 +1448,11 @@ def process(args):
|
|
|
1448
1448
|
if len(inputpathlist)==0:
|
|
1449
1449
|
print("Images are not found.")
|
|
1450
1450
|
return
|
|
1451
|
-
|
|
1452
|
-
|
|
1451
|
+
try:
|
|
1452
|
+
os.makedirs(args.output, exist_ok=True)
|
|
1453
|
+
except OSError as exc:
|
|
1454
|
+
print(f"Failed to create output directory: {args.output}")
|
|
1455
|
+
print(f"Error: {exc}")
|
|
1453
1456
|
return
|
|
1454
1457
|
|
|
1455
1458
|
detector=get_detector(args)
|
|
@@ -1590,7 +1593,14 @@ def process(args):
|
|
|
1590
1593
|
|
|
1591
1594
|
def main(download_models=False):
|
|
1592
1595
|
import argparse
|
|
1596
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
1593
1597
|
from pathlib import Path
|
|
1598
|
+
application_version = __version__
|
|
1599
|
+
if download_models:
|
|
1600
|
+
try:
|
|
1601
|
+
application_version = version("ndlocr-lite")
|
|
1602
|
+
except PackageNotFoundError:
|
|
1603
|
+
pass
|
|
1594
1604
|
base_dir = Path(__file__).resolve().parent
|
|
1595
1605
|
parser = argparse.ArgumentParser(description="Arguments for NDLkotenOCR-Lite")
|
|
1596
1606
|
if download_models:
|
|
@@ -1620,7 +1630,7 @@ def main(download_models=False):
|
|
|
1620
1630
|
parser.add_argument("--device", type=str, required=False, help="Device use (cpu or cuda)", choices=["cpu", "cuda"], default="cpu")
|
|
1621
1631
|
parser.add_argument("--enable-tcy", action="store_true", dest="enable_tcy", default=False, help="Enable tate-chuu-yoko (縦中横) detection for vertical text (e.g. newspaper OCR)")
|
|
1622
1632
|
parser.add_argument("--json-only", action="store_true", help="Disable .xml and .txt output and only output JSON")
|
|
1623
|
-
parser.add_argument("--version", action="version", version=f"%(prog)s {
|
|
1633
|
+
parser.add_argument("--version", action="version", version=f"%(prog)s {application_version}")
|
|
1624
1634
|
if download_models:
|
|
1625
1635
|
from model_download import MODELS, resolve_model_paths
|
|
1626
1636
|
|
version.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ndlocr_lite-2.0.0.dev0.dist-info → ndlocr_lite-2.0.0.dev1.dist-info}/licenses/LICENCE_DEPENDENCEIES
RENAMED
|
File without changes
|
|
File without changes
|