Created
March 21, 2019 20:53
-
-
Save mightywombat/cad2cd5e9e0df342bfd558f51656cd5c to your computer and use it in GitHub Desktop.
Modern Word Killer
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
Assign user-provided era to global variable | |
Filter lists: | |
wordAgeList - filter relative-modern words to relModWords list | |
idiomAgeList - filter relative-modern phrases to relModIdiom list | |
idiomAgeList - filter relative-old phrases to relOldIdiom list | |
# later user option to allow older idioms, user option to specify age of idioms to allow | |
commonWordList - filter relative modern words to relModWords list (same list as above) | |
commonWordList - filter contemporary words to contempCom list | |
For each in relModIdiom | |
Search document for occurences | |
# later function to find *similar phrases | |
For each occurence | |
Add phrase, date, containing sentence, to report document | |
For each in relOldIdiom | |
Search document for occurences | |
# later function to find *similar phrases | |
For each occurence | |
Add phrase, date, containing sentence, to report document | |
For each in document | |
If in contempCom | |
Skip word and continue | |
Elif word is capitalized | |
Skip word and continue | |
Elif in relModWords | |
Report word, date, sentence | |
Else add word to uniqueWordList | |
queryCount = 0 | |
For each in uniqueWordList | |
If queryCount < 1000 | |
Query MW for date ***maximum of 1000 queries per day. | |
Add word, date to wordAgeList | |
queryCount++ | |
If date > era | |
Add word, date, (containing sentence?) to report | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment