20 lines
692 B
Python
Executable File
20 lines
692 B
Python
Executable File
# # Define package-level variables
|
|
# __version__ = '0.0'
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
cur_dir = str(Path(__file__).parents[0])
|
|
sys.path.append(cur_dir)
|
|
sys.path.append(os.path.join(cur_dir, "externals"))
|
|
|
|
# Import modules
|
|
from .run import load_engine
|
|
from .src.ocr import OcrEngine
|
|
# from .src.word_formation import words_to_lines
|
|
from .src.word_formation import words_to_lines_tesseract as words_to_lines
|
|
from .src.utils import ImageReader, read_ocr_result_from_txt
|
|
from .src.dto import Word, Line, Page, Document, Box
|
|
# Expose package contents
|
|
__all__ = ["OcrEngine", "Box", "Word", "Line", "Page", "Document", "words_to_lines", "ImageReader", "read_ocr_result_from_txt"]
|