Skip to content

Instantly share code, notes, and snippets.

@shawngraham
Created May 12, 2016 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawngraham/239edbcd7f5a495a7218bb93a9ce76a1 to your computer and use it in GitHub Desktop.
Save shawngraham/239edbcd7f5a495a7218bb93a9ce76a1 to your computer and use it in GitHub Desktop.
using spelling as a proxy for ocr quality. `brew install aspell` to get that part of the equation running.
for f in *.txt; do
totalbadwords="$(cat "$f" | aspell list -d en_CA --encoding utf-8 | wc -w)"
totalwords="$(wc -w "$f")"
echo "$totalbadwords, $totalwords" >> "finalscore.csv"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment