I'm making a simple JS game that needs a list of English dictionary words. Will I need to build the list myself, or is it possible to access the system's or browser's spell-check dictionary - or maybe there's another solution?
You can use Aspell English dictionary.
Aspell English dictionary is availabe at: ftp://ftp.gnu.org/gnu/aspell/dict/0index.html.
To dump world list from the Aspell dictionary checkout:
The command to dump English list of words should look something like:
aspell -d en dump master | aspell -l en expand > words.txt
with node you can install random-words
npm install random-words
import it and you're done:
var randomWords = require('random-words');
console.log(randomWords());
requirebin
Easiest solution that I found is getting a text or JSON file from anywhere(on web) which contains all the English words(not meanings like in dictionary). I got it from this repository, this contains a text file and a JSON file.
You can easily read data from JSON file using javascript or other programming languages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With