Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Word Checker

Author
Message
Syndu
17
Years of Service
User Offline
Joined: 1st Nov 2006
Location:
Posted: 30th Jan 2022 16:28
I'm working on a word game (think Boggle) where you would be required to create words from the available letters. What is the best way to check that the word is a real word. Is anything built into agk or do I need to provide a list of words, or maybe an online check.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Jan 2022 16:38 Edited at: 30th Jan 2022 16:43
list of words. load into an array and use .find

i know on android, if the list is provided as a json file it loads infinitely faster than reading words line by line or parsing.

some discord discussion: https://discord.com/channels/436107917037404160/565108990628069377/778714054532661258

i'll see if i can find the word list i was using.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Jan 2022 17:38 Edited at: 30th Jan 2022 17:59
quick and dirty handling attached.
  • creates a list of (~195k) words 3-8 chars long from the larger dictionary (included so you can make your own word list from a larger one, if necessary)
  • save/load .json
  • .find validation of word entry (index = -1 if not found in array)

note: OpenBrowser(GetWritePath()) so you can retrieve the new list from the write location.

ack!: it doesn't contain 3 letter words for some reason... ah, there were never any in the original dictionary file :/

Attachments

Login to view attachments
Syndu
17
Years of Service
User Offline
Joined: 1st Nov 2006
Location:
Posted: 30th Jan 2022 20:36
Virtual Nomad, thank you, this is great. Im not seeing the larger dictionary you said was included, if you can post that it would be awesome. I defiantly need 2 and 3 letter words in my dictionary.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Jan 2022 20:51
i had just grabbed the first list i found to start work on the code but now i think i found the source i had used before: http://www.gwicks.net/dictionaries.htm.

i've been busy trying some of the GREAT [TD] Submissions before the deadline which has taken up most of my time but should have some soon to polish this up.
Syndu
17
Years of Service
User Offline
Joined: 1st Nov 2006
Location:
Posted: 30th Jan 2022 21:17
This is perfect, you made my day. Thanks a million.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Jan 2022 21:25

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-19 10:44:30
Your offset time is: 2024-04-19 10:44:30