How can I get a list of all English words?

I'm creating a project in which I need a list of every English word, so I'm wondering how I would get this. The only thing I need is that I can filter the words based on some boolean function, thanks. btw I'm pretty beginner so sry If i'm not really good at writing these.

Hi Amber,
Can you give one example, or a test case? If you need every English word,
you need to read a English dictionary, which has all the words, and store
it in map, or hash-map, because list would be very slow for accessing the
words. (is it the case that you want to break a line, e.g., “brown fox
jumped over the lazy dog” into list of words, [brown, fox, jumped, over,
the, lazy, dog]?)
Best,
Mukesh
On Sun, 6 Feb 2022 at 16:25, Amber Crawford
I'm creating a project in which I need a list of every English word, so I'm wondering how I would get this. The only thing I need is that I can filter the words based on some boolean function, thanks. btw I'm pretty beginner so sry If i'm not really good at writing these. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Oxford English Dictionary contains more than 600000 words, by the way. And sometimes even humans have trouble discerning typos from made-up words, which may or may not be a concern for you, depending on your goal.
On 6 Feb 2022, at 17:36, mukesh tiwari
wrote: Hi Amber,
Can you give one example, or a test case? If you need every English word, you need to read a English dictionary, which has all the words, and store it in map, or hash-map, because list would be very slow for accessing the words. (is it the case that you want to break a line, e.g., “brown fox jumped over the lazy dog” into list of words, [brown, fox, jumped, over, the, lazy, dog]?)
Best, Mukesh
On Sun, 6 Feb 2022 at 16:25, Amber Crawford
wrote: I'm creating a project in which I need a list of every English word, so I'm wondering how I would get this. The only thing I need is that I can filter the words based on some boolean function, thanks. btw I'm pretty beginner so sry If i'm not really good at writing these. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

It reads like you want to verify that a given word in a string exists in a
list of (english) words.
https://github.com/dwyl/english-words seems to contain a large user
contributed list of english words (~450k). It seems to contain a number of
loan words as well as potentially made up words, so caveat emptor.
As far as testing for membership - I'd suggest building up a Data.Trie.Set (
https://hackage.haskell.org/package/trie-simple-0.4.1.1/docs/Data-Trie-Set.h...).
The trie data structure provides a reasonably compact representation of
strings, and Sets provide a function to test if a given word is a member.
On Sun, Feb 6, 2022 at 11:37 AM mukesh tiwari
Hi Amber,
Can you give one example, or a test case? If you need every English word, you need to read a English dictionary, which has all the words, and store it in map, or hash-map, because list would be very slow for accessing the words. (is it the case that you want to break a line, e.g., “brown fox jumped over the lazy dog” into list of words, [brown, fox, jumped, over, the, lazy, dog]?)
Best, Mukesh
On Sun, 6 Feb 2022 at 16:25, Amber Crawford
wrote: I'm creating a project in which I need a list of every English word, so I'm wondering how I would get this. The only thing I need is that I can filter the words based on some boolean function, thanks. btw I'm pretty beginner so sry If i'm not really good at writing these. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On 6 Feb 2022, at 11:24 am, Amber Crawford
wrote: I'm creating a project in which I need a list of every English word, so I'm wondering how I would get this. The only thing I need is that I can filter the words based on some boolean function, thanks. btw I'm pretty beginner so sry If i'm not really good at writing these.
There is no single definitive list, but many Unix-like systems (including MacOS) have various word lists in /usr/share/dict/: Linux: $ ls /usr/share/dict/ linux.words words MacOS: $ ls /usr/share/dict/ README connectives propernames web2 web2a words FreeBSD: $ ls /usr/share/dict/ README freebsd propernames web2 web2a words -- Viktor.

On linux you can use /etc/dictionaries-common/words, for example ❯ grep "stream" /etc/dictionaries-common/words bloodstream bloodstream's bloodstreams downstream mainstream mainstream's mainstreamed mainstreaming mainstreams midstream midstream's stream stream's streamed streamer streamer's streamers streaming streamline streamlined streamlines streamlining streams upstream From: Haskell-Cafe On Behalf Of Amber Crawford Sent: Sunday, February 06, 2022 11:25 AM To: haskell-cafe@haskell.org Subject: [Haskell-cafe] How can I get a list of all English words? I'm creating a project in which I need a list of every English word, so I'm wondering how I would get this. The only thing I need is that I can filter the words based on some boolean function, thanks. btw I'm pretty beginner so sry If i'm not really good at writing these.
participants (6)
-
Amber Crawford
-
Gregory Popovitch
-
MigMit
-
mukesh tiwari
-
Norman Nunley
-
Viktor Dukhovni