No description
Find a file
2025-11-09 13:34:17 -07:00
OCR manual fixes 2025-11-02 20:34:18 -07:00
OCR-glossary Fix lots of italics 2025-11-09 10:21:00 -07:00
OCR-misc More misc OCR scans 2025-11-08 14:04:03 -07:00
OCR-notes OCR of Notes section 2025-11-08 13:16:55 -07:00
.env.example Dot env example 2025-11-02 08:29:00 -07:00
.gitignore ignore output dir 2025-11-02 08:47:57 -07:00
CC-1.0-Universal.txt CC0 1.0 Universal 2025-11-01 18:24:42 -06:00
CHANGELOG.txt v0.9.1 2025-11-09 13:34:17 -07:00
ocr-glossary.py Maybe more prompt hints for lang acronyms 2025-11-09 00:06:06 -07:00
ocr-misc.py Update misc URL, header, pages 2025-11-08 13:50:47 -07:00
ocr-notes.py rm multicol from notes 2025-11-08 08:38:10 -07:00
ocr.py Change the header line 2025-11-02 18:19:24 -07:00
README.md Use archive.org version, not goog 2025-11-02 13:10:23 -07:00
requirements-dev.txt dev deps 2025-11-02 08:33:49 -07:00
requirements.txt python deps 2025-11-02 16:50:03 -07:00

Tolkien's Sir Gawain and the Green Knight

This is a project to convert J. R. R. Tolkien's Sir Gawain and the Green Knight to text.

Tolkien did two versions, of SGGK, one in 1925 in the original Middle English, and another decades later that he translated into Modern English.

This project focusses on the Middle English version.

Wikisource

With luck, this present project will be able to contribute to this Wikisource project:

Sources

The version linked at the Wikisource page is a google digitization. There is a superior version without google encumberances available from archive.org. The versions are identical, both published in 1925. The archive.org version:

The present project will use the version from archive.org to avoid google.

OCR

Setup:

git clone https://spacecruft.org/books/gawain-tolkien
cd gawain-tolkien/
python -m venv venv
source venv/bin/activate
pip install -U setuptools pip wheel
pip install -r requirements.txt
# optionally, to get development dependencies:
pip install -r requirements-dev.txt
cp -p .env.example .env
${EDITOR} .env
python ocr.py

The ocr.py script is set to use Qwen3-VL with Alibaba's cloud, but should work with any OpenAI compatible endpoint.

License

Public domain.

CC0 1.0 Universal

2025, Jeff Moe