Skip to content

toebes/ciphers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ciphers

This set of TypeScript routines and web pages meets two separate needs:

  1. Test generation for Science Olympiad Codebusters
  2. Solvers for various American Cryptogram Association Ciphers

You can see the current version of the application at https://toebes.com/codebusters/

The application is built using a combination of:

Word/Quote processing tools

Convert-JsonToCsv.ps1

Powershell script for generating a .csv file from a .json file

findwordsinquotes.js

Script to find all the individual words present in a quote file. Usage:

node find-words-in-quotes.js --words   "C:\path\words.txt" --quotes "C:\path\quotes.txt" --out "C:\path\word_hits.csv" --nohits "C:\path\word_nohits.csv"
  • words.txt - one word per line
  • quotes.txt - one quote per line (plain text)

outputs two CSVs:

  • word_hits.csv - Word,QuoteNum,Quote
  • word_nohits.csv - Word

match-words-to-quotes.js

Matches all the known words (in words.txt file) to all the quotes in the quotes (in quotes.txt file) identifying what words are in the quotes which are not in the word list

Usage:

node match-words-to-quotes.js --quotes <quotes.txt> --words <words.txt> [--out quote_matches.csv]

word_checker.py

Processes all the words in the word list and determines if they are actual words by scanning wiktionary and wikipedia.

Usage:

python .\word_checker.py --in .\wordcheck.txt --cache cache.json --workers 8 --rpm 240 --timeout 8 --heartbeat 2 --checkpoint 1000 --backend requests --ipv4
  • wordcheck.txt - is the list of words to check
  • cache.json - is a state saving cache for restarting and not having to check the website again

This also creates a ../cache directory so that once it downlodads a page from the website, it doesn't download it again.

export_wikt_csv.py

Dumps all the processed words from word_checker.py into a csv file.

python export_wikt_csv.py --in .\wordcheck.txt --wikt-cache-root ..\cache\wiktionary_cache --out words_defs.csv