Gist 6ab67c7133edab5b3b01760a3f226a25
✓ Published0🌍 Public
HHoffmannP
Last edited Feb 22, 2024
Created on Feb 22, 2024
This example compares the frequency of uppercase letters in the King James and Luther Bibles, printing a percentage of all uppercase letters per book. Using Python’s `re` module with custom regular expressions, it filters out lines with fewer than four words, skips verses’ opening formatting, and excludes all-uppercase words before counting letters. The output reports each translation’s uppercase share, revealing stylistic differences in capitalization. The script reads local text files (`kjv.txt`, `luther.txt`) and computes letter counts via `matchLetters` and `matchUCLetters` patterns.
AI-generated description