Dragon12
Posts: 61
Joined: Thu Jul 18, 2013 10:33 am

Looking for an English word list

Sun Mar 19, 2017 8:52 am

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.

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: Looking for an English word list

Sun Mar 19, 2017 10:01 am

"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.

User avatar
scruss
Posts: 3212
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Looking for an English word list

Sun Mar 19, 2017 3:08 pm

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
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

Dragon12
Posts: 61
Joined: Thu Jul 18, 2013 10:33 am

Re: Looking for an English word list

Sun Mar 19, 2017 10:55 pm

Excellent, I'd forgotten about apt-cache search. Much quicker than how I was trying to find the word list.

Return to “General discussion”