Free word list for use programmatically? [closed]

非 Y 不嫁゛ 提交于 2019-11-27 03:21:15
Paolo Bergantino

Options:

  1. Look for /usr/share/dict/words on your common or garden variety Unix install.
  2. http://www.ibiblio.org/webster/
  3. http://wordlist.sourceforge.net/
  4. http://svnweb.freebsd.org/csrg/share/dict/ (click the 'revision' tag of the file 'words')

#4 is the one I used for my own Python experiment into word games, and it worked nicely.

For bonus points, here's something to get you started on your word program:

import re
startwith = "MOON"
endwith = "GOLF"
cklength = re.compile('.{' + str(len(startwith)) + '}(\n)?$', re.I)
filename = "C:/dict.txt"
words = set(x.strip().upper() for x in open(filename) if x.match(cklength))

Words will then be a set of all 4 letter words in the dictionary. You can do your logic from there.

Most unix (which includes osx) have a file /usr/share/dict/words.

ryeguy

You can find a 2.2mb list of english words here.

You can access them using the file i/o functions.

if you have access to a linux install, there should be some word lists in

/usr/share/dict/

Have a look at the databases in dict.org. These are actually dictionary databases, so you would need to extract the word definitions yourself. You could start from Wordnet.

For something similar I have used the mozilla English dictionary. It is a zip file (even though it has another extension). Inside you will find en-GB.dic which is the dictionary.

I was having the same issue and with some digging into a scrabble based site, I found several of their word lists in a nice text format. They have an English version at https://www.wordgamedictionary.com/english-word-list/

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