DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Need help from someone who's used NetSpell  (Read 4,082 times)

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Need help from someone who's used NetSpell
« on: March 29, 2011, 12:27 PM »
I'm using Paul Welter's Netspell for the first time, and have rigged up a test harness.  I've placed the needed DLL and dictionary files in the necessary /bin/ subfolder (I'm programming in C#, and will attach a zip of my test project):

NetSpell1.png

I've created a test harness C# WinForms application with a textbox and a command button that invokes the SpellChecker.  I enter a single intentionally misspelled word, "dictionery" (which should be "dictionary") into the textbox, and click the command button to invoke the spell checker.  The SpellChecker_MisspelledWord() method gets called, as it should, and NetSpell's internal "Suggested Words" form pops up.  I select the first suggested word, which happens to be the correct spelling, and click the "Replace" button.  

NetSpell2.png

Of course, I get a Not Implemented exception because I've not yet implemented the SpellChecker_ReplacedWord event.

NetSpell3.png

I know there's a SpellChecker.ReplaceWord() method, but am not sure where/how to use it.

What I want to happen: when I select the correctly spelled word, "dictionary" (see second screenshot above), and click the Replace button, I want to programmatically replace my program's textbox's incorrectly spelled word "dictionery" with the replacement word.  Even more helpful that a post of corrective action would be a post of corrective action and an attached zip of my project modified so that it works.

Any help appreciated.  I've been looking at the methods and events in Object Viewer, but so far nothing has clicked in my head...
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

« Last Edit: March 29, 2011, 12:34 PM by kyrathaba »

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • Participated in NANY Challenge Eight Times
    • Programming School - Deluxe Bonus Medal
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Military Service Badge - US Army
    • Writer
Re: Need help from someone who's used NetSpell
« Reply #1 on: March 30, 2011, 12:51 AM »
I think I figured out what I want to do.  I'm attaching a screencast of it in action, along with the updated C# project (zipped).

P.S.  How can I embed a .SWF version of the screencast in this post?  I know that'd be a much smaller file, just not sure how to do it.
Win 10 Pro running on a 3.2 GHz CPU and 12 Gb RAM
__________________________________________

Proofreading Service: http://williammillerservices.com/proofreading

Original address: https://www.donationcoder.com/forum/index.php?topic=26217.0