1

I'm developing a pip package atm which relies on the tesserocr package. I have my own custom traindeddata being included into my pypi package, but when I go to create the PyTessBaseAPI for the package demo I'm not sure how to set the path.

Here's what my current directory structure looks like:

root/
|-- src/
    |-- example_package/
        |-- __init__.py
        |-- example.py
        |-- resources/
            |-- tessdata
                |-- custom.traineddata

I don't know if I need to (or if there's a way) to get the pypi package resource's absolute path and use that when constructing the PyTessBaseAPI.

Does anyone have any experience / insight into how to properly achieve this?

Justin
  • 11
  • 2

0 Answers0