<div dir="ltr">It reads like you want to verify that a given word in a string exists in a list of (english) words.<div><br></div><div><a href="https://github.com/dwyl/english-words">https://github.com/dwyl/english-words</a> 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.</div><div><br></div><div>As far as testing for membership - I'd suggest building up a Data.Trie.Set (<a href="https://hackage.haskell.org/package/trie-simple-0.4.1.1/docs/Data-Trie-Set.html">https://hackage.haskell.org/package/trie-simple-0.4.1.1/docs/Data-Trie-Set.html</a>). 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.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 6, 2022 at 11:37 AM mukesh tiwari <<a href="mailto:mukeshtiwari.iiitm@gmail.com">mukeshtiwari.iiitm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi Amber,</div><div dir="auto"><br></div><div dir="auto">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]?) </div><div dir="auto"><br></div><div dir="auto">Best,</div><div dir="auto">Mukesh</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 6 Feb 2022 at 16:25, Amber Crawford <<a href="mailto:aidancrawfordd@gmail.com" target="_blank">aidancrawfordd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">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.<br></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>