This project extracts structured data from historical directory images using OCR and Python. This is not a complete project, just a showcase
- Python 3.8+
- Tesseract OCR (installed and in your PATH)
- The following Python packages:
- opencv-python
- numpy
- pytesseract
- Pillow
- pandas
- spacy
-
Clone the repository and navigate to the project directory.
-
Install Python dependencies:
pip install -r requirements.txt
-
Install the spaCy English model:
python -m spacy download en_core_web_sm
-
Install Tesseract OCR:
- Windows: Download here and add the install directory (e.g.,
C:\Program Files\Tesseract-OCR) to your PATH. - macOS:
brew install tesseract
- Linux:
sudo apt-get install tesseract-ocr
- Windows: Download here and add the install directory (e.g.,
-
Place your directory images in the
sample-datafolder.- Update the image path in
directory_ocr.pyif needed.
- Update the image path in
-
Run the script:
python directory_ocr.py
-
Output:
- The script prints parsed entries to the console.
- It saves a CSV file named
test_output.csvwith columns:last,first,occupation,home_addr.