See man aspell
Use in programming
aspell --master en dump master
List all the words in the
en
dictionary.
In some languages like Polish, you might want to expand the affix flags for the given vocabulary:
aspell -d pl dump master | aspell -l pl expand > my.dict