Page 1 of 1

Looking for an English word list

Posted: Sun Mar 19, 2017 8:52 am
by Dragon12
As part of my desktop migration to a Raspberry Pi I need an English word list. I use this to solve crossword puzzles.

The more usual Linux distributions have a word list in linuxwords,txt. I've spent hours searching the Pi for something similar but without success. The Aspell dictionary word list has to be stored somewhere. Does anyone know where the word list is stored?

I could download a word list if all else fails.

Re: Looking for an English word list

Posted: Sun Mar 19, 2017 10:01 am
by jojopi
"apt-cache search dictionary" will show packages that might be relevant, and "dpkg -L aspell-en" will list the files from an installed package. However, most spelling programs store dictionaries in their own compressed formats, so you would have to do some research to reuse them in your own code.

/usr/share/dict/words is actually the standard place for a plain text English word list, according to FHS which most distros comply with.

Re: Looking for an English word list

Posted: Sun Mar 19, 2017 3:08 pm
by scruss
I was about to post a lazy ‘it's in /usr/share/dict/words answer, but I'm glad I checked, because by default, it isn't!

There are several English word lists available:

Code: Select all

$ apt-cache search wordlist | grep 'English.*/usr/share/dict'
wamerican - American English dictionary words for /usr/share/dict
wamerican-huge - American English dictionary words for /usr/share/dict
wamerican-insane - American English dictionary words for /usr/share/dict
wamerican-large - American English dictionary words for /usr/share/dict
wamerican-small - American English dictionary words for /usr/share/dict
wbritish - British English dictionary words for /usr/share/dict
wbritish-huge - British English dictionary words for /usr/share/dict
wbritish-insane - British English dictionary words for /usr/share/dict
wbritish-large - British English dictionary words for /usr/share/dict
wbritish-small - British English dictionary words for /usr/share/dict
wcanadian - Canadian English dictionary words for /usr/share/dict
wcanadian-huge - Canadian English dictionary words for /usr/share/dict
wcanadian-insane - Canadian English dictionary words for /usr/share/dict
wcanadian-large - Canadian English dictionary words for /usr/share/dict
wcanadian-small - Canadian English dictionary words for /usr/share/dict
(what? No NZ/Aus/SA/…?)
So for me, running

Code: Select all

sudo apt install wcanadian
gave me a /usr/share/dict/words file of 99,197 entries. It's plain text.

If you install multiple word lists, you can pick the default one with

Code: Select all

sudo select-default-wordlist

Re: Looking for an English word list

Posted: Sun Mar 19, 2017 10:55 pm
by Dragon12
Excellent, I'd forgotten about apt-cache search. Much quicker than how I was trying to find the word list.