The document pre-processing flow zone consists of document classification and digitization (OCR).

![Document Pre Processing Zone.png](oMmjfNDstSSw)

  - Document Classification:  the [document classification python recipe](recipe:compute_1Jon6Y5u) takes in  [example_documents](managed_folder:008vhkiq) as input and classifies each document into respective folders: [searchable](managed_folder:1Jon6Y5u), [non_searchable](managed_folder:0oOwj5E4), or [error](managed_folder:epzn88Ed) based on if the document is digital, a native image, or unable to be processed.
  - Document Digitization:
     1. Leverage [PyMuPDF](https://pypi.org/project/PyMuPDF/) python package to extract the text from digital document in [searchable](managed_folder:1Jon6Y5u) folder.
     2. Leverage [Tesseract Plugin](https://www.dataiku.com/product/plugins/tesseract-ocr/) to perform optical character recognition (OCR) to extract text from native images in [non_searchable](managed_folder:0oOwj5E4) folder. The output of these respective OCR tools are stored in [ocr_dataset](dataset:ocr_dataset).
     3. the final [python recipe](recipe:compute_cPB8dLy4) consolidates all extracted text into one dataset, along with the metadata.