I have about 200,000 PDFs made up of 20 different designs. i.e In an organization, different (20) departments issue monthly award submission requirements. Each department has its own document format. These documents are collected by the organization.

Now I need to extract the paragraphs, bullet points, or sentences from each of these PDFs, organize it properly, specify if it is a requirement or not (label the data), and store it in storage. This process needs to be repeatable/automated for any future PDF.

A lot of the pdfs are not structured, have no tags or bookmarks, have no table of content.

I want to know what is the best technique or method for handling this type of problem?

  • $\begingroup$ Perhaps, this can be more suitably answered at the "Software Recommendations" SE site. $\endgroup$
    – Syed
    Commented Dec 25, 2021 at 8:15

2 Answers 2


This can be easily done using NLP and Computer Vision. These types of tasks usually come under Document Understanding domain.

For your problem statement you will need to create a Pipeline with 2 majot phases.

PHASE 1 : Document Classification

This is the phase where the documents are classified into 1 of the 20 categories that you mentioned in the question. You can either use an NLP model (like BERT or other variations) to classify the docs or a NLP Computer Vision hybrid model (like LayoutLM series). IMO Bert based models work quite well for these types of tasks.

PHASE 2 : Document data extraction

Once the doc has been classified, it will then move on to the second phase where a NER (Named Entity Recognition) model will extract the relevant data from the doc. You can again use an NLP based model (Bert or its variations) or a hybrid model like LayoutLM series.

PS : The answer given by @Vivek Singhal is absolutely incorrect. Deep Learning models have great generalisation capabilities if you train them on a proper dataset. So you don't need multiple models for each different formats. Just train one model for Document Classification and one for NER and you should be good!

Let me know if you have any further questions



For each of the 20 designs, may have to design custom annotated section extractor using Vision AI algos. Then do OCR using tessaract or other OCR libraries on extracted sections.

I am not sure if this can be generalized for random document designs going forward. Each new document design needs CUSTOM vision solution first.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.