You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A minimal [non-]entry: minimal in code (changes) and output...
Inspired by @lizadaly's #35 which introduced me to Timothy Dexter's A Pickle for the Knowing Ones (1802).
Dexter wrote without punctuation, but in response to complaints about the missing marks, ended subsequent editions with a page of punctuation on the last page:
fouder mister printer the Nowing ones complane of my book the fust
edition had no stops I put in A Nuf here and thay may peper and solt
it as they plese
Well what would it look like if we extracted all the punctuation from a novel?
Code
I already have code to replace all words with a meow of the same length, preserving punctuation; so let's fix that to replace all words with spaces, preserving punctuation:
A minimal [non-]entry: minimal in code (changes) and output...
Inspired by @lizadaly's #35 which introduced me to Timothy Dexter's A Pickle for the Knowing Ones (1802).
Dexter wrote without punctuation, but in response to complaints about the missing marks, ended subsequent editions with a page of punctuation on the last page:
Well what would it look like if we extracted all the punctuation from a novel?
Code
I already have code to replace all words with a meow of the same length, preserving punctuation; so let's fix that to replace all words with spaces, preserving punctuation:
+ return " " * len(word)
hugovk/meow.py@489593e
(cleanup and tests hugovk/meow.py@21382b8)
https://github.com/hugovk/meow.py/blob/main/no_meows.py
Usage
python3 no-meows.py infile.txt > outfile.txt
Output
Let's run it on Dexter's A Pickle for the Knowing Ones and "Books about English language -- Punctuation".
It certainly produces lots of punctuation! But no words? Who am I to judge what a word is?
Let's use the
wc
Unix utility! It's happy enough that these contain words!Unfortunately these first four books are under the golden 50k threshold, BUT Dostoyevsky's The Idiot fits nicely.
Extracts
Dexter
Hamilton on THE PARENTHESIS
Allardyce on THE DASH
Dostoyevsky
`
The text was updated successfully, but these errors were encountered: