# How to extend dictionary.txt

How to extend the default dictionary.txt for Dictionarylookup to all words?

For example, first I

wordsExtended=WordData[]~Join~DictionaryLookup["*"]//Union;
wordsExtended//Length


In[73]:= DictionaryLookup["appals"]
Out[73]= {}
In[74]:= WordData["appals"]
Out[74]= {{appal,Verb,Frighten},{appal,Verb,Nauseate}}


How to add all such words like #appals# to dictionary.txt?

One method: Tuples to create a word verified by WordData, which takes too much time. For

In[78]:= Binomial[26,7]
Out[78]= 657800


Second method:

listAlls = # <> "s" & /@ DictionaryLookup["*"];
wordsToExport = Select[listAlls, Length[WordData@#] > 1 &];
In[81]:= Complement[wordsToExport,DictionaryLookup["*"]]//Length
Out[81]= 2580


I get 2580 new words for dictionary.txt, but how to get all prefix and suffix such like s pre es... and so on.

-
Possible duplicate: mathematica.stackexchange.com/q/13142/5 –  The Toad May 23 '13 at 6:35
@rm-rf ha,I saw one WolframAlpha["appals", {{"Input", 1}, "Plaintext"}] return "appalls (English word)" –  HyperGroups May 23 '13 at 6:41
'appals' might be the US spelling, 'appalls' the British... –  cormullion May 23 '13 at 7:16

You can retrieve all of the inflected forms of words (plurals, conjugations, etc) that WordData knows with:

DeleteDuplicates@
Flatten[WordData[#, "InflectedForms"][[All, 2]] & /@ WordData[]]

-
do you know how to obtain all the prefix or suffix, can it be retrieved form WordData? –  HyperGroups May 29 '13 at 15:54
Well not all inflections in English consist of just adding a prefix or suffix. The rules are more consistent if you look at phonology as opposed to spelling, for example, berry->berries. A few English grammar Wikipedia articles probably contain enough information to meet your needs for common prefixes and suffixes: en.wikipedia.org/wiki/English_plural –  Michael Hale May 29 '13 at 16:46