Code Monkey home page Code Monkey logo

pdfstruc's Introduction

Install dependencies

do apt install tesseract only when using ocr to do the same

use spacy download only when using nlp (pdfstruc.py script)

apt install tesseract-ocr -y
pip install -r requirements.txt
spacy download en_core_web_sm

Define Environment Variables to use the selected features only:

If all env var = false, it will only give pdf to images

export use_opencv=true
export use_nlp=true
export use_nlp_topic_modelling=true
export use_regex_for_research_paper=false
export use_regex_for_page_no=true
export use_for_ssrn=false
export use_process_again=false # begins the process anew if true

Execute Python Script for getting images named as page numbers correctly and text data of pdf

python3 pdf2jpg.py

To do the same using ocr

go to the directory containing images of pdf file and execute the script

python3 pdfocr.py

Execute Python Script for also getting summary of pdf's and using Topic Modelling to sort with relevency:

python3 pdfstruc.py

If there is any pdf file that has not been processed to jpg images in the directory where the .py script executes, the py script automatically creates a folder of the same name of the pdf file and then starts converting pdf pages to jpg images saved with appropriate page name.

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.