Created
October 6, 2015 17:13
-
-
Save gojomo/0be4982ba2ba57cbc14b to your computer and use it in GitHub Desktop.
Count female/male pronouns in a plain-text file (here, Moby Dick from Project Gutenberg)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl http://www.gutenberg.org/cache/epub/2701/pg2701.txt > moby-dick.txt | |
$ tr -cs "[:alpha:]" "\n" < moby-dick.txt | egrep "^(she|her|hers|herself)$" | wc -l | |
439 | |
$ tr -cs "[:alpha:]" "\n" < moby-dick.txt | egrep "^(he|him|his|himself)$" | wc -l | |
5384 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment