User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25

Thread: How does the Spellcheck object work?

  1. #1
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro

    Join Date
    May 2010
    Posts
    536
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How does the Spellcheck object work?

    Hey, folks!

    I have started experimenting with placing a Spellchecker object in my project. I was able to open the "Big Example" example that comes with the object. It uses quite a few other objects which I've never used.

    I was interested in setting up bare-bones spellchecking functionality to my project. While the documentation is thorough in regards to its usage, I found the example project to be fairly complicated.

    I did read a thread some time ago where the Spellchecker object author had offered to explain how this object works. I'd be interested in learning more about it, so that I could attempt to implement a simple spellchecker to my project.

    Thanks very much!


    RGBreality

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    Quote Originally Posted by RGBreality
    I did read a thread some time ago where the Spellchecker object author had offered to explain how this object works.
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=192754#Post1927 54
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro

    Join Date
    May 2010
    Posts
    536
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    Thanks for the thread, LB!

    Unfortunately, this thread doesn't go into any more detail about how the Spellcheck object is used; it only discusses that there are examples there.

    I'm hoping that Jax might go into some more detail on how to create a bare-bones spellchecker.


    RGBreality

  4. #4
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    OK, sure, here is a simpler how-to-use guide.

    Stage 1: Load a dictionary
    Obviously the spell-checker doesn't work without a dictionary. Insert the object into the frame and don't change anything on the dialog box. Most of these settings are only required for advanced use.

    Now, 'On start of frame' you want to 'Load Wordlist (Pauses MMF)'. For more advanced use you can load it in the background and update a progress bar using 'LoadingPercentage' expression, but for now we'll just let it pause your program whilst it is loading.

    Choose 'Smaller Wordlist.nswl' as the dictionary, which you can download from here.

    'NSWL' stands for 'Null separated word list'. This means that each word in the dictionary is separated by a 'null character'. (ASCII value 0). Words can also be separated by new lines, but as a new line in Windows is 2 characters using null characters saves a little bit of space.

    It is also OK to load one dictionary then another, and the object will then have a dictionary with both the details.

    All Spellcheck objects share the same dictionary, so if you load it on the first frame and use it again on the second, you don't need to reload it.

    Now we can't actually tell if it has worked so far when we run it, so we need to continue...

    Stage 2: Checking if a word is in the dictionary
    We can check if a word is in the dictionary by using the 'Is Word correct?' condition. So, let us make an edit box with a button which tells us what is the case.

    Add a button and an edit box, and add the condition "On Button Clicked" + "Is [Text of edit box] correct?" and provide some effect, like setting a string to "Is in dictionary". Then have the same event but with the second condition negated and have it do something like set a string to "Is not in dictionary". The following screen-shot shows this:

    http://sites.google.com/site/jlnwebster/misc-files/Spellcheck004.png

    We can test that the spell check really does use the same dictionary for each object by doing the loading and the checking in different frames.

    Stage 3: Getting suggestions
    Now this is not very exciting. However, we can get suggestions using the object. To do this, you get the incorrectly spelt word and pass it to "List Suggestions" action. This doesn't directly do anything, but it does cause the 'On Correction Suggestion' event to get triggered once per suggestions.

    So add a list box, and when an incorrect word is found you should clear it and then call 'List suggestions', adding the suggestion to the list each time. Use 'Suggestions -> Get Suggestions' (Suggestion$) to get the name of the current suggestion.

    Tweak the settings on the dialog box to change how the results are returned.

    The Next Step
    The next step is to spell-check sentences. This means splitting it up into words. This is such an annoying, boring, repetitive task that it'd be useful if it does it for you. So it does! That is what the 'Auto-parse' setting does - read the docs for it. It even allows you to set things that it does and does not spell check inside, so you can really easily make something that only spellchecks things in quotes or within comments in a programming language, for instance.

    ~~~

    Does this help?

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    Thanks, nice guide.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  6. #6
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro

    Join Date
    May 2010
    Posts
    536
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    Hey, Jax! Thank you for such a thorough and well-explained post! I really appreciate it (and your Spellchecker object)!


    Most sincerely,

    RGBreality

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    Jax I hope you don't mind, but I've added this to the articles section and to the wiki.

  8. #8
    Clicker Multimedia Fusion 2 Developer
    Jax's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    Thanks everybody =)

    No problem RickyRombo, although I've now written it up on my blog with more details and screenshots. View it here.

    Feel free to put the images in your post if it is possible to do that.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperAndroid Export Module

    Join Date
    Jun 2006
    Location
    israel
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    if i want to use the spellcheck object on a full sentence how can i do it? and someone put here an example with scroolbar extension can i get the link to download it ?

    thank you

  10. #10
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How does the Spellcheck object work?

    Guide: Here
    The extension comes with Bonus Pack 1, and is Dev only.
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Spellcheck in flash (PLEASE!)
    By Tuna in forum SWF/Flash Export Module Version 2.0
    Replies: 1
    Last Post: 21st September 2011, 05:18 PM
  2. Spellcheck program for full sentence
    By ezra in forum File Archive
    Replies: 0
    Last Post: 3rd July 2010, 07:56 AM
  3. SpellCheck + upgrade
    By felinex in forum Multimedia Fusion 2 - Technical Support
    Replies: 22
    Last Post: 10th April 2008, 12:32 PM
  4. [Bug] Spellcheck Object
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 21st February 2008, 06:55 PM
  5. Spellcheck object example
    By crugh in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 19th June 2007, 12:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •