javascript list of english words for a game

允我心安 提交于 2019-12-01 15:34:08
Nemanja Trifunovic

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

The wordlist for Firefox spellchecking seems to come from this repository: https://github.com/marcoagpinto/aoo-mozilla-en-dict. So you could download it there to get a word list.

You can also install the dictionary as addon (https://addons.mozilla.org/en-GB/firefox/language-tools/) but I don't know if or how the dictionary-addons can be accessed with JavaScript directly from inside the browser.

you can get a worlist here http://marcoagpinto.cidadevirtual.pt/proofingtoolgui.html .. look for the WORDLIST link on the right

Was looking for a simple JSON endpoint I could use for a workbook - wound up uploading one to github:

https://gist.githubusercontent.com/jesseditson/1e6b2b524814320515ccfe7e2f856eda/raw/17d61fa1e80e14b13c4525b09f84148772586b59/words.json

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!