Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Custom Dictionary in Pytesseract #78

Closed
sanudatta11 opened this issue Nov 28, 2017 · 2 comments
Closed

Using Custom Dictionary in Pytesseract #78

sanudatta11 opened this issue Nov 28, 2017 · 2 comments

Comments

@sanudatta11
Copy link

I have created a seperate custom dictionary and a custom function which works perfect with normal command line tesseract but I want to know how to use the same in the pytesseract package. Because in pytesseract it is not using that function, neither am having any clue of how to provide the function name .

In normal I use:
tesseract test.png myfunc #myfunc being the custom function

How to do the same in pytesseract

@jsreid13
Copy link
Contributor

Can you provide any additional information on what your function does and what your dictionary contains?

@bozhodimitrov
Copy link
Collaborator

@sanudatta11 you should append the name of the custom function to the string parameter - config for the image_to_string function.

Also if you want to use custom dictionary (trained data), you will need to either copy the trained file to the Tesseract default directory for trained files, or to pass the custom directory path to the dictionary (trained data) via the config string argument.

Please check the README file of the project for code examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants