A very poor use of time.
- Download
wikiweb.rb
- Ruby 3.2.1 required (or something reasonably recent)
- Requires nokogiri (
gem install nokogiri
)
//download dictionary from https://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict.0.7a | |
//dictionary format: ['RHYME', 'R AY1 M'] | |
const rhymeDict = []; | |
//despite the size of the file, this parses reasonably quickly | |
function populateRhymeDict() { | |
fetch('cmudict.0.7a.txt') | |
.then(response => response.text()) | |
.then(data => { |