ndlocr-lite 1.4.0.dev0__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.
Files changed (43) hide show
  1. cli.py +15 -0
  2. config/NDLmoji.yaml +4 -0
  3. config/__init__.py +0 -0
  4. config/ndl.yaml +21 -0
  5. deim.py +169 -0
  6. model/__init__.py +0 -0
  7. model_download.py +87 -0
  8. ndl_parser.py +1083 -0
  9. ndlocr_lite-1.4.0.dev0.dist-info/METADATA +182 -0
  10. ndlocr_lite-1.4.0.dev0.dist-info/RECORD +43 -0
  11. ndlocr_lite-1.4.0.dev0.dist-info/WHEEL +5 -0
  12. ndlocr_lite-1.4.0.dev0.dist-info/entry_points.txt +2 -0
  13. ndlocr_lite-1.4.0.dev0.dist-info/licenses/LICENCE +395 -0
  14. ndlocr_lite-1.4.0.dev0.dist-info/licenses/LICENCE_DEPENDENCEIES +1891 -0
  15. ndlocr_lite-1.4.0.dev0.dist-info/top_level.txt +16 -0
  16. ndlocr_lite_gui/__init__.py +12 -0
  17. ndlocr_lite_gui/assets/icon.png +0 -0
  18. ndlocr_lite_gui/gui_config.py +21 -0
  19. ndlocr_lite_gui/main.py +2105 -0
  20. ocr.py +1425 -0
  21. optional_features/__init__.py +52 -0
  22. parseq.py +74 -0
  23. pdf_output_utils.py +71 -0
  24. reading_order/__init__.py +0 -0
  25. reading_order/order/__init__.py +0 -0
  26. reading_order/order/parse_xml.py +143 -0
  27. reading_order/order/reorder.py +211 -0
  28. reading_order/order/smooth_order.py +110 -0
  29. reading_order/order/warichu_block.py +178 -0
  30. reading_order/order/wrap_dataset.py +13 -0
  31. reading_order/utils/__init__.py +0 -0
  32. reading_order/utils/file.py +21 -0
  33. reading_order/utils/logger.py +29 -0
  34. reading_order/utils/time.py +63 -0
  35. reading_order/utils/xml.py +97 -0
  36. reading_order/xy_cut/__init__.py +0 -0
  37. reading_order/xy_cut/block_xy_cut.py +366 -0
  38. reading_order/xy_cut/eval.py +55 -0
  39. tcy_wrapper.py +202 -0
  40. tools/ndlkoten2tei.py +115 -0
  41. uicomponent/localelabel.py +118 -0
  42. uicomponent/textdaisy.py +1093 -0
  43. version.py +3 -0
@@ -0,0 +1,16 @@
1
+ cli
2
+ config
3
+ deim
4
+ model
5
+ model_download
6
+ ndl_parser
7
+ ndlocr_lite_gui
8
+ ocr
9
+ optional_features
10
+ parseq
11
+ pdf_output_utils
12
+ reading_order
13
+ tcy_wrapper
14
+ tools
15
+ uicomponent
16
+ version
@@ -0,0 +1,12 @@
1
+ """Launch the packaged GUI without changing the desktop build entry point."""
2
+
3
+
4
+ def run(argv=None):
5
+ from functools import partial
6
+ from . import main as app
7
+
8
+ args = app.parse_gui_args(argv, download_models=True)
9
+ app.ft.run(
10
+ partial(app.main, args=args, download_models=True),
11
+ assets_dir=str(app.ASSETS_DIR),
12
+ )
Binary file
@@ -0,0 +1,21 @@
1
+ GUI_DEFAULT_CONFIG = {
2
+ 'langcode': 'ja',
3
+ 'json': True,
4
+ 'xml': True,
5
+ 'tei': True,
6
+ 'txt': True,
7
+ 'markdown': False,
8
+ 'pdf': False,
9
+ 'pdf_viztxt': False,
10
+ 'pdf_merge': True,
11
+ 'pdf_page_output': True,
12
+ 'pdf_resolution': 300,
13
+ 'text_daisy': False,
14
+ 'result_markdown_display': False,
15
+ 'selected_output_path': None,
16
+ 'visualize': True,
17
+ }
18
+
19
+
20
+ def build_default_config():
21
+ return dict(GUI_DEFAULT_CONFIG)