<commit_before># https://media.dwds.de/dta/images/wetzel_reisebegleiter_1901/wetzel_reisebegleiter_1901_0021_800px.jpg
BOOK=wetzel_reisebegleiter_1901
PAGE=0021
BASENAME=$(BOOK)_$(PAGE)

DEBIAN_PACKAGES = libxml2-utils tesseract-ocr tesseract-ocr-script-frak wget dwdiff
XMLLINT = xmllint --format
OCR_TRANSFORM = ../bin/ocr-transform.sh
TESSERACT = tesseract -l Fraktur
WGET = wget
RM = rm -f
DWDIFF = dwdiff -p -l -c
PAGER = less -R
APT_GET = sudo apt-get -y

.PHONY: roundtrip
roundtrip: $(BASENAME).roundtrip.hocr $(BASENAME).alto.page

.PHONY: deps
deps:
	$(APT_GET) install $(DEBIAN_PACKAGES)

.PHONY: diff
diff: $(BASENAME).roundtrip.hocr $(BASENAME).hocr
	$(DWDIFF) $^ || exit 0

.PHONY: idiff
idiff: $(BASENAME).roundtrip.hocr $(BASENAME).hocr
	$(DWDIFF) $^ | $(PAGER)<commit_msg>Run tesseract executable with path<commit_after># https://media.dwds.de/dta/images/wetzel_reisebegleiter_1901/wetzel_reisebegleiter_1901_0021_800px.jpg
BOOK=wetzel_reisebegleiter_1901
PAGE=0021
BASENAME=$(BOOK)_$(PAGE)

DEBIAN_PACKAGES = libxml2-utils tesseract-ocr tesseract-ocr-script-frak wget dwdiff
XMLLINT = xmllint --format
OCR_TRANSFORM = ../bin/ocr-transform.sh
TESSERACT = /usr/bin/tesseract -l Fraktur
WGET = wget
RM = rm -f
DWDIFF = dwdiff -p -l -c
PAGER = less -R
APT_GET = sudo apt-get -y

.PHONY: roundtrip
roundtrip: $(BASENAME).roundtrip.hocr $(BASENAME).alto.page

.PHONY: deps
deps:
	$(APT_GET) install $(DEBIAN_PACKAGES)

.PHONY: diff
diff: $(BASENAME).roundtrip.hocr $(BASENAME).hocr
	$(DWDIFF) $^ || exit 0

.PHONY: idiff
idiff: $(BASENAME).roundtrip.hocr $(BASENAME).hocr
	$(DWDIFF) $^ | $(PAGER)
{'fraction_non_alphanumeric': 0.1449004975124378, 'fraction_numerical': 0.03109452736318408, 'mean_word_length': 5.141221374045801, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7172759', 'n_tokens_mistral': 791, 'n_tokens_neox': 701, 'n_words': 129}