OpenCV + Tesseract + LLM-based crossword puzzle solver.
This project converts a photographed crossword into a structured JSON puzzle, queries LLM solvers for answers, and validates/visualizes the results. The pipeline is modular: image processing → JSON construction → LLM integration → solution validation.
- Grid extraction and per-cell OCR (Tesseract).
- JSON puzzle builder with word lengths and intersections.
- Pluggable LLM solver integrations (multiple providers supported).
- Python 3.8+
- OpenCV (cv2), Pillow, pytesseract
- API keys for any LLM providers used (configured in project)
- Install dependencies (example): pip install -r requirements.txt
- Ensure Tesseract is installed and pytesseract.tesseract_cmd points to the binary.
- Run the main program: python crossword.py
- crossword.py — main pipeline and orchestration
- digit_recogniser.py — cell extraction and OCR helpers
- digit_classifiers/ — per-detector implementations (Tesseract-based, etc.) - contains multiple digit-classifier implementations for comparison and testing
- generate_json.py — builds puzzle JSON (lengths, intersections)
- llm/ — LLM solver wrappers and prompts
- overlay_grid.py — visualization/overlay of solutions