3

I just installed Ubuntu a couple days ago. As I was browsing through Ubuntu's files I found an interesting document containing seemingly all the words in the English dictionary. I know I did not put the file there so I know that it is part of the operating system, but I'm not sure why it would need a random list.

The file is /usr/share/dict/words

1
  • 3
    That would be the English dictionary for spell checking.
    – psusi
    Jan 28, 2015 at 3:43

2 Answers 2

4

A chain of whys:

$ dpkg -S /usr/share/dict/words  
diversion by dictionaries-common from: /usr/share/dict/words
diversion by dictionaries-common to: /usr/share/dict/words.pre-dictionaries-common
wamerican, dictionaries-common: /usr/share/dict/words
$ aptitude why dictionaries-common
i   hunspell-en-us Depends dictionaries-common (>= 0.10)
$ aptitude why hunspell-en-us     
i   libenchant1c2a Depends  aspell-en | myspell-dictionary | aspell-dictionary | ispell-dictionary | hunspell-dictionary
i   hunspell-en-us Provides hunspell-dictionary                                                                         
$ aptitude why libenchant1c2a
i   libwebkitgtk-3.0-0 Depends libenchant1c2a (>= 1.6.0)
$ aptitude why libwebkitgtk-3.0-0
i   unity-control-center Depends libwebkitgtk-3.0-0 (>= 1.3.10)

Of course, this doesn't really answer why it needs this list of words. Just that a chain of dependencies caused it to be there. The other chain of whys might be a better answer, but:

$ aptitude why wamerican
i   cracklib-runtime Recommends wamerican | wordlist
$ aptitude why cracklib-runtime
i   libcrack2 Recommends cracklib-runtime
$ aptitude why libcrack2         
i   libpwquality1 Depends libcrack2 (>= 2.8.12)
$ aptitude why libpwquality1
i   unity-control-center Depends libpwquality1 (>= 1.1.0)

More plausible: the list of words is used to mark passwords present in a common dictionary as poor quality.

6
  • More plausible it's a dict for spell checking & for some commands like 'look'. The default list is medium size (90k+ words), other lists are available up to the 'insane' list (650k+ words
    – doug
    Nov 3, 2016 at 22:28
  • @doug I just submitted an answer to that effect. I will add your info, thanks!
    – wjandrea
    Nov 3, 2016 at 22:55
  • @doug that's why I feel password strength checking is more plausible - after all, how big can even 650k word-files be, and if you're really in for spell-checking, why not include larger lists? OTOH, if you just want common words...
    – muru
    Nov 3, 2016 at 23:37
  • I guess one way to 'sorta' check is to misspell a word that's not in the installed list(s) & see if it comes up in the various spellcheckers (- by 650k mean # of words so that's a bit more than 1/2 of available english ones based on some estimates of 1,025,109, though most dictionaries have less than 650,000
    – doug
    Nov 4, 2016 at 1:45
  • Taking a quick look it seems gedit & firefox don't use that file(s), so maybe you're to something. (
    – doug
    Nov 4, 2016 at 1:56
2

From Wikipedia:

words is a standard file on all Unix and Unix-like operating systems, and is simply a newline-delimited list of dictionary words. It is used, for instance, by spell-checking programs.

The words file is usually stored in /usr/share/dict/words or /usr/dict/words.

On Debian and Ubuntu, the words file is provided by the wordlist package, or its provider packages wbritish, wamerican, etc.

From @doug's comment (link is mine):

The default list is medium size (90k+ words), other lists are available up to the 'insane' list (650k+ words)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .