GMS 2 Real-time Spell Checking (250,000+ English Dictionary Words)

Discussion in 'Tutorials' started by Zack, May 25, 2018.

  1. Zack

    Zack Member

    Joined:
    Jun 20, 2016
    Posts:
    14
    GM Version: GameMaker Studio 2 (also compatible with GameMaker Studio 1.4)
    Target Platform: All
    Download: https://github.com/zbanack/TSE-dictionary
    Links: Blog post: https://www.zackbanack.com/blog/spellcheck-2018

    Summary:
    A video lesson where I walk you through the steps of incorporating real-time English spell checking into your GameMaker Studio project. This is essential to word games, and the code can be expanded to create autocorrect or autocomplete features.

    Tutorial:
     
    Last edited: May 25, 2018
    Director_X, Rob, Alexx and 1 other person like this.
  2. Alexx

    Alexx Member

    Joined:
    Jun 21, 2016
    Posts:
    436
    I like the feature of being able to quickly get a random word of a given length.

    Anyone making a word themed game should check this out.
     
  3. mjadev

    mjadev Member

    Joined:
    Jan 28, 2017
    Posts:
    51
    great tuto, thanks for sharing
     
  4. gnysek

    gnysek Member

    Joined:
    Jun 20, 2016
    Posts:
    1,303
    All seems right, but for Polish language, there's around 61 MB of all possible words, so do you think it still will be so fast this way ? or I should divide it into files like A2, A2, A3... A14, B2, B3..... Z2, Z3.... Z15, and create ds maps for every letter and every length then ?
     
  5. NoobsWeStand

    NoobsWeStand Member

    Joined:
    Jun 20, 2016
    Posts:
    143
    Very nice tutorial!
    Is it possible to make it load any faster or load the words asynchronously?
    It takes around 7 seconds to load each time
     
  6. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    388
    You don't have to add the modified version of words like : sluchac >> slucham, sluchasz etc. This drastically decreases the amount of words you'd put in your app. (As a Turkish speaker I know what it looks like. Also I have B1 Pol. language level)

    I've followed the @Zack 's post. Here's the FASTEST solution(which is in below 1 second on Mobile). First time you load a text file into list, just save the list as ds_list_save and copy the string. Next time, instead of loading from file, simply load the list from this text. (ds_list_load)
    Enjoy
     
    NoobsWeStand likes this.
  7. devonhg

    devonhg Member

    Joined:
    Jun 21, 2016
    Posts:
    25
    This is really interesting, good job!
     
  8. blane todd

    blane todd Member

    Joined:
    Aug 11, 2019
    Posts:
    3
    I cannot get this to work at all. no matter how i implement dict_word_isvalid() and no matter what i pass though it, it always returns false.
    I called dict_init() at the beginning and all files are included. what other step am i missing ??
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice