An OCR for Kannada.
AksharaJaana is a package which uses tesseract ocr in the backend to convert the read-only kannada text to editable format. A Special feature of this is it can separate columns in the page and thus making it easier to read and edit. Do consider using this package if necessary and feel free to mail me for any clarifications.
- Email : navaneethsharma2310oct@gmail.com
- Twitter handle: https://twitter.com/navaneethakbh
Happy coding and installing.
To see the python package visit https://pypi.org/project/AksharaJaana/
Conda environment is preferred for the smooth use
- AksharaJaana (pip package), check out the latest version available
- Tesseract
- poppler
Open terminal and execute below commands.
-
Install the requirements in your system
sudo apt-get update -y sudo apt-get install -y poppler-utils python3 python3-venv tesseract-ocr tesseract-ocr-kan
-
Installing packages for AksharaJaana
pip install --upgrade AksharaJaana
-
Installing tesseract-ocr in the system
- Download tesseract
- go to the website
- click on
tesseract-ocr-w64-setup-v5.0.0-alpha.20200328.exe (64 bit)
.
- Install tesseract for Kannada Language and Script
- open the downloaded file and click next and accept the agreement.
- Next you will give an option to choose the languages.
- Choose kannada in both script and language
- Add tesseract to Path
- Check if this folder
C:\Program Files\Tesseract-OCR\
is present. If yes, follow below procedure - Add
C:\Program Files\Tesseract-OCR\
to your system PATH by doing the following- Click on the
Windows start button
, search forEdit the system environment variables
, click on Environment Variables - Under System variables, look for and double-click on PATH, click on
New
. - then add
C:\Program Files\Tesseract-OCR\
, click OK.
- Click on the
- if folder is not present, manually add the folder tesseract-ocr to the Program Files in the C drive which must be present at the download section (after extraction) and follow the same procedure
- See complete docs.
- Check if this folder
- Download tesseract
-
Installing poppler in the system
- Download Poppler
- go to this page
- click on
poppler-0.54_x86
- Unzip the file and copy files to
C:\Users\Program Files\poppler-0.68.0_x86
- Add poppler to path
- Add
C:\Program Files\poppler-0.68.0_x86\bin
to your system PATH by doing the following:- Click on the Windows start button, search for Edit the system environment variables, click on Environment Variables
- under System variables, look for and double-click on PATH, click on New
- then add C:\Users\Program Files\poppler-0.68.0_x86\bin, click OK.
- Add
- Download Poppler
-
Installing python and pip in the system (If pip is not installed)
-
Installing packages for AksharaJaana
-
open command prompt
pip install AksharaJaana
-
-
Reboot the system before starting to use
from AksharaJaana.main import OCREngine
from AksharaJaana.utils import ModelTypes, FileOperationUtils
ocr = OCREngine(modelType=ModelTypes.Easyocr)
# choices are Paddleocr, Easyocr, Tesseract
text = ocr.get_text_from_file("Your file Path")
print(text)