Code Monkey home page Code Monkey logo

converting-scraped-marathi-textbooks-in-pdf-using-tesseract-ocr's Introduction

Task 1

  python wiki_extractor.py --keyword= "Topic name" --num_urls= 100
  --output= "output.json"

Task 2

Install Poppler on Windows

Go to - https://github.com/oschwartz10612/poppler-windows/releases/

Specifying poppler path in code

pages = convert_from_path(filepath, poppler_path=r"actualpoppler_path")

Install Tesseract on Windows

Go to - https://github.com/UB-Mannheim/tesseract/wiki

Specifying Tesseract path in code before call image_to_string function

pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'

Install other Languages in Tesseract

Go to - https://github.com/tesseract-ocr/tessdata/

Download the .traineddata file and place it in C:\Program Files\Tesseract-OCR\tessdata

For more info visit on - https://ocrmypdf.readthedocs.io/en/latest/languages.html

Specifying language in pytesseract

text = pytesseract.image_to_string(file,lang='mar')

Install these librabries

  pip install pytesseract
  pip install pdf2image
  pip install openpyxl # for excel files
  pip install python-poppler

converting-scraped-marathi-textbooks-in-pdf-using-tesseract-ocr's People

Contributors

rakshitgarg99 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.