Page 4 of 8 FirstFirst 1234567 ... LastLast
Results 121 to 160 of 283

Thread: 20130521 - i00 Spell Check and Control Extensions -No Third Party Components Required

  1. #121

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!

    Posted version 20120609 with support for DataGridViews

    Kris

  2. #122

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120608 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by rmoliani View Post
    Hello
    I'm trying using i00SpellCheck on my project... and everything is fine.. but... i'm from brazil... and here we have a big problem: accentuation...

    well.. i changed the dic.dic to my dic.dic in pt-br..
    and worked fine... but some words, with accentuation stay very strange... look in pic...

    anybody know how can i correct this?

    tks.. and congrats about this project!

    Hello can you send me the dictionary file?

    Thanks
    Kris

  3. #123
    New Member
    Join Date
    Jun 2012
    Posts
    4

    Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!

    Hey man...
    here is the link to dic..
    i took from openoffice...

    http://openoffice.c3sl.ufpr.br/contr...ries/pt_BR.zip

  4. #124

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!

    Thanks will have a look today or tomorrow

    Kris

  5. #125
    New Member
    Join Date
    Jun 2012
    Posts
    4

    Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!

    Tks Kris..
    i'm waiting...

  6. #126

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by rmoliani View Post
    Tks Kris..
    i'm waiting...
    Sorry about the delay .. will have a look this weekend ... completely changed the inner workings of the spell checker ... so have been a little too busy

    Will post back soon
    Kris

  7. #127
    New Member
    Join Date
    Jun 2012
    Posts
    4

    Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!

    Sure Kris, no problem...
    while this i'm looking for other thing in my project...
    tks!!

  8. #128

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120609 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by i00 View Post
    Sorry about the delay .. will have a look this weekend ... completely changed the inner workings of the spell checker ... so have been a little too busy

    Will post back soon
    Kris
    Hrm ... not entirely sure ... but if you want to look into it...

    Check the LoadFromFile function for the dictionary ....

    My.Computer.FileSystem.ReadAllText(Filename) seems to load the file incorrectly ... I also tried a streamreader.readtoend... but it had the same result ... let me know if you figure out a way ... till then i will put this on the back burner...

    Also you will prob need to change the save function also ... since it uses writealltext... so imagine it would save the file like that even if you get the loading working...

    Kris

  9. #129

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120618 - i00 .Net Spell Check - Code Project prize winner!

    Version 20120618 is out, with custom plug in support!

  10. #130

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120622 - i00 .Net Spell Check - Code Project prize winner!

    20120622 is out with plugin support for the FastColoredTextBox control!

    Kris

  11. #131
    New Member
    Join Date
    Jun 2012
    Posts
    3

    Re: 20120622 - i00 .Net Spell Check - Code Project prize winner!

    Hi Kris,
    Just a quick note from the UK to say thank you for all your hard work on this project.
    I'm using i00SpellCheck in my project which allows forensic scientists to securely record their examination notes (now, with correct spelling!).

    As the project is used by scientists internationally, support for Open Office dictionaries would be really cool when you get five minutes!

    Once again, thank you for making this available.

    Kind regards,
    Fin.

  12. #132

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120622 - i00 .Net Spell Check - Code Project prize winner!

    Plan to look into this again soon ...

    Will keep you posted...

    Btw version 20120625 is out ... with some speedups and test project changed to automatically load the tabs from plugins.

    Kris

  13. #133
    New Member
    Join Date
    Jun 2012
    Posts
    1

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    I am using i00 Spell check in my project and it works great!!

  14. #134
    New Member
    Join Date
    Jul 2012
    Posts
    3

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    I hope you don't mind, but I'm looking into this now, and I'll likely use it for a personal project of mine. You did very well in coding this, much appreciated.

  15. #135
    New Member
    Join Date
    Jul 2012
    Posts
    3

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Umm I'm having problems, I've not used visual basic for a long time, but I get a lot of errors.. would it be possible to get a basic guide for this? like I have no idea if I'm doing the referencing or importing right, and I get an error on the 'Me.EnableSpellCheck()'... don't suppose there's a straight forward video guide? or somethin?

  16. #136
    New Member
    Join Date
    Jul 2012
    Posts
    3

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    I got it working, though lacking the defintions, thanks anyway.

  17. #137

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Glad to know that you got it working ... please post what you did to get it working so others may learn if they are having the same issues...

    As for a video guide this is a good idea ... I may look into doing this sometime.

    Thanks
    Kris

  18. #138
    Addicted Member
    Join Date
    May 2012
    Posts
    209

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    I am attempting to implement your program into mine. However, I am wondering is there a way where I can use this to correct spelling mistakes made in Excel? My program currently let's the User open up a Worksheet in a DataGrid and I'm wondering if I can basically do the same with your program but if when the User uploads the Excel Worksheet it will correct Spelling mistakes there. Let me know if I'm making any sense here I am very new to VB 2010. I was using VB6 previously.
    If you find the information I give you useful, please rate my post and tell me why you thought it was helpful. Thanks!

    If your issue has been fixed, please come back to your thread and mark it Resolved. Thanks!

  19. #139

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by johndmingione View Post
    I am attempting to implement your program into mine. However, I am wondering is there a way where I can use this to correct spelling mistakes made in Excel? My program currently let's the User open up a Worksheet in a DataGrid and I'm wondering if I can basically do the same with your program but if when the User uploads the Excel Worksheet it will correct Spelling mistakes there. Let me know if I'm making any sense here I am very new to VB 2010. I was using VB6 previously.
    What do you mean "in excel" ... your DataGrid that loads the excel documents does it not? the DGV can support spell checking...

    In your upload process you could check each word in each cell, and change it accordingly with the spell check engine.

    Is this what you meant?
    Kris

  20. #140
    Addicted Member
    Join Date
    May 2012
    Posts
    209

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    What I mean by in Excel is will your Spellcheck work on a DataGrid that's on my form? I use the DataGrid to show a specific Worksheet within a Workbook and let the User edit it in the Form. If I reference your Spellcheck will it SpellCheck it?
    If you find the information I give you useful, please rate my post and tell me why you thought it was helpful. Thanks!

    If your issue has been fixed, please come back to your thread and mark it Resolved. Thanks!

  21. #141

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by johndmingione View Post
    What I mean by in Excel is will your Spellcheck work on a DataGrid that's on my form? I use the DataGrid to show a specific Worksheet within a Workbook and let the User edit it in the Form. If I reference your Spellcheck will it SpellCheck it?
    Yes it does automatically spellcheck data grid views

    Need to do more than reference tho, isn't hard though... check the OP

    Kris

  22. #142
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    482

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    I will probably use this in my project but I do have a question:

    It seems to take a long time to do the initial Spell Check on a file open. For instance, 27 lines of text with an average of about 6 or 7 words per line (many with 4 or less words) it takes about 12-15 seconds to finish. Is this normal?

  23. #143
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    482

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    I have also noticed that most of the time (seems like not always) if you close the Spell Check dialog window before it finishes checking the entire document you get the following error:

    RaceOnRCWCleanup was detected
    Message: An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss.

    I was able to reproduce this error in your test app. I selected the RichTextBox tab, then clicked the spell check button and then immediately closed it. You may have to do this more than once to reproduce.

    Thanks.

  24. #144

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by Maverickz View Post
    I will probably use this in my project but I do have a question:

    It seems to take a long time to do the initial Spell Check on a file open. For instance, 27 lines of text with an average of about 6 or 7 words per line (many with 4 or less words) it takes about 12-15 seconds to finish. Is this normal?
    It should take a few seconds ... but 12 - 15 seconds seems a little excessive ... I will look into this in a few days ... i changed the way the spell check threads work about a month ago .. will look into optimizing this

    Kris

  25. #145

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by Maverickz View Post
    I have also noticed that most of the time (seems like not always) if you close the Spell Check dialog window before it finishes checking the entire document you get the following error:

    RaceOnRCWCleanup was detected
    Message: An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss.

    I was able to reproduce this error in your test app. I selected the RichTextBox tab, then clicked the spell check button and then immediately closed it. You may have to do this more than once to reproduce.

    Thanks.
    Is this error handled? where is it breaking? - screen shot would be ideal

    Thanks
    Kris

  26. #146
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    482

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by i00 View Post
    Is this error handled? where is it breaking? - screen shot would be ideal

    Thanks
    Kris
    Actually I removed the forms and recompiled the code as a DLL and the errors went away. If I get a chance I'll backup my project and reference the exe instead of the DLL and try to get you more details.
    The problem of the slow spell checking times is still present though in the DLL compile though. I may try to convert the dictionary that comes with Firefox to work with your code and see if maybe the dictionary is just too large. It seems like it has a lot of Euro specific spellings that I wouldn't even use anyway, such as "colour" instead of the US "color".

  27. #147

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    OK... well let me know how it goes

    Kris

  28. #148

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by Maverickz View Post
    I will probably use this in my project but I do have a question:

    It seems to take a long time to do the initial Spell Check on a file open. For instance, 27 lines of text with an average of about 6 or 7 words per line (many with 4 or less words) it takes about 12-15 seconds to finish. Is this normal?
    Interesting I checked the speed on my i7 2.6 GHz and it the spell check engine checks at an average of 60.42 words per second... how many words are visible in your text box (it only checks visible words)?

    Even with 27 lines @ 7 words (189) words total, it should take about 3.5 seconds (after redraw time etc)...?!

    Can you post the tet in your text box here?

    Thanks
    Kris

  29. #149
    New Member
    Join Date
    Aug 2012
    Location
    Byron, Illinois
    Posts
    9

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    I am really impressed with this Spell Check and would love to implement it in a project I am working on. Great job!!

    However, I am currently experiencing two issues, which may or may not be related.

    The first is that we are using MDI forms for this application and the issue of drawing the correction lines is indeed as feared in your "Possible Issues" segment. It is visible over other windows. It is said that the following code can be used to implement the older "compatible" rendering.

    DirectCast(TextBox.SpellCheck, SpellCheckTextBox).RenderCompatibility = True

    But I am not sure where this should be located or how. I tried it both before and after EnableSpellCheck(). Before I see nothing on the text box. After, the behavior was as without the .RenderCompatibility being set. I am sure I am probably not implementing it correctly.

    The other issue I have had is that the Spell Checking (minus the above stated issue) works fine with multiple MDI forms until I close one of them and try to open another, at which time I receive the error "Cannot access a disposed object". with the following references to the SpellCheck app in the exception dump:

    at i00SpellCheck.SpellCheckFormExtension.ReloadSpellCheckControls(SpellCheckSettings SpellCheckSettings)
    at i00SpellCheck.SpellCheckFormExtension.LoadDictionary(Object oSpellCheckSettings)


    Has anyone seen something similar? Has anyone else tried using it with MDI apps?

    Spell Checking is not a must have for this app, but I would love to be able to implement it with this great utility if possible.

  30. #150
    Addicted Member
    Join Date
    Jun 2008
    Location
    Macedonia
    Posts
    188

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Hi i use Macedonian dictonary i change my dictonary from mk.dic to dic.dic when i load program it doesnt show me errors like it's not load the dictonary
    see pic: Name:  6e368f6c81d14a08aae8cee.png
Views: 1656
Size:  26.8 KB. Here is my dictonary opened in notepad2 Name:  68bde57b447b4b84a11d515.png
Views: 1346
Size:  16.0 KB and when in program click removed (some word) from dictonary or add word to dictonary my dic.dic make like this Name:  4f9b3e005a6e4e48a0a6523.png
Views: 1329
Size:  13.8 KB all cyrilic char is like cubic.
    I use this dictonary http://openoffice.c3sl.ufpr.br/contr...ries/mk_MK.zip
    Edit.
    I change encoding of text from ANSI to UTF-8 now doesnt show cubic like in last picture but it doesnt load dictonary.


    [QUOTE=rmoliani;4183110]Hello
    I'm trying using i00SpellCheck on my project... and everything is fine.. but... i'm from brazil... and here we have a big problem: accentuation...

    well.. i changed the dic.dic to my dic.dic in pt-br..
    and worked fine... but some words, with accentuation stay very strange... look in pic...
    Change encoding for dictonary to UTF-8 Name:  e7c8ce4d54904d998893278.png
Views: 1571
Size:  35.5 KB and save file, it may work for your dictonary.
    Last edited by stru4nak; Aug 21st, 2012 at 09:43 AM.
    MACEDONIA 4EVER

  31. #151

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by stru4nak View Post
    Hi i use Macedonian dictonary i change my dictonary from mk.dic to dic.dic when i load program it doesnt show me errors like it's not load the dictonary
    see pic: . Here is my dictonary opened in notepad2 and when in program click removed (some word) from dictonary or add word to dictonary my dic.dic make like this all cyrilic char is like cubic.
    I use this dictonary http://openoffice.c3sl.ufpr.br/contr...ries/mk_MK.zip
    Edit.
    I change encoding of text from ANSI to UTF-8 now doesnt show cubic like in last picture but it doesnt load dictonary.


    Quote Originally Posted by rmoliani View Post
    Hello
    I'm trying using i00SpellCheck on my project... and everything is fine.. but... i'm from brazil... and here we have a big problem: accentuation...

    well.. i changed the dic.dic to my dic.dic in pt-br..
    and worked fine... but some words, with accentuation stay very strange... look in pic...
    Change encoding for dictonary to UTF-8 and save file, it may work for your dictonary.
    Sorry I am a little confused by this post... did you sort your problem out, also if you did please describe how?

    Thanks
    Kris

  32. #152

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by rfreedlund View Post
    I am really impressed with this Spell Check and would love to implement it in a project I am working on. Great job!!

    However, I am currently experiencing two issues, which may or may not be related.

    The first is that we are using MDI forms for this application and the issue of drawing the correction lines is indeed as feared in your "Possible Issues" segment. It is visible over other windows. It is said that the following code can be used to implement the older "compatible" rendering.

    DirectCast(TextBox.SpellCheck, SpellCheckTextBox).RenderCompatibility = True

    But I am not sure where this should be located or how. I tried it both before and after EnableSpellCheck(). Before I see nothing on the text box. After, the behavior was as without the .RenderCompatibility being set. I am sure I am probably not implementing it correctly.

    The other issue I have had is that the Spell Checking (minus the above stated issue) works fine with multiple MDI forms until I close one of them and try to open another, at which time I receive the error "Cannot access a disposed object". with the following references to the SpellCheck app in the exception dump:

    at i00SpellCheck.SpellCheckFormExtension.ReloadSpellCheckControls(SpellCheckSettings SpellCheckSettings)
    at i00SpellCheck.SpellCheckFormExtension.LoadDictionary(Object oSpellCheckSettings)


    Has anyone seen something similar? Has anyone else tried using it with MDI apps?

    Spell Checking is not a must have for this app, but I would love to be able to implement it with this great utility if possible.
    Since your application is a MDI application, you probably want all controls to use render compatibility. To do this the best method would probably be to do this:

    vb Code:
    1. AddHandler SpellCheckControlExtension.SpellCheckControlAdded, AddressOf SpellCheckControlAdded
    2. Me.EnableSpellCheck
    3.  
    4. '....
    5.  
    6. Private Sub SpellCheckControlAdded(ByVal sender As Object, ByVal e As SpellCheckControlAddedRemovedEventArgs)
    7.     Dim SpellCheckTextBox = TryCast(e.Control.SpellCheck, SpellCheckTextBox)
    8.     If SpellCheckTextBox IsNot Nothing Then
    9.         SpellCheckTextBox.RenderCompatibility = True
    10.     End If
    11. End Sub

    Let me know if this works
    Thanks
    Kris

    EDIT:

    Also I just checked placing DirectCast(TextBox1.SpellCheck, SpellCheckTextBox).RenderCompatibility = True directly after .EnableSpellCheck() ...
    Worked fine for me ... if you are still stuck maybe you could paste your code?

    Thanks
    Kris

  33. #153
    Addicted Member
    Join Date
    Jun 2008
    Location
    Macedonia
    Posts
    188

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    For latin language like brazilian who have special characters worked when you change encoding to UTF-8 but for cyrilic language like Macedonian, Russian, Serbian and etc doesn't work, it not show spell correction. So this spellchecker work only for English language.
    Last edited by stru4nak; Aug 23rd, 2012 at 08:47 AM.
    MACEDONIA 4EVER

  34. #154
    New Member
    Join Date
    Aug 2012
    Location
    Byron, Illinois
    Posts
    9

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by i00 View Post
    Since your application is a MDI application, you probably want all controls to use render compatibility. To do this the best method would probably be to do this:

    vb Code:
    1. AddHandler SpellCheckControlExtension.SpellCheckControlAdded, AddressOf SpellCheckControlAdded
    2. Me.EnableSpellCheck
    3.  
    4. '....
    5.  
    6. Private Sub SpellCheckControlAdded(ByVal sender As Object, ByVal e As SpellCheckControlAddedRemovedEventArgs)
    7.     Dim SpellCheckTextBox = TryCast(e.Control.SpellCheck, SpellCheckTextBox)
    8.     If SpellCheckTextBox IsNot Nothing Then
    9.         SpellCheckTextBox.RenderCompatibility = True
    10.     End If
    11. End Sub

    Let me know if this works
    Thanks
    Kris

    EDIT:

    Also I just checked placing DirectCast(TextBox1.SpellCheck, SpellCheckTextBox).RenderCompatibility = True directly after .EnableSpellCheck() ...
    Worked fine for me ... if you are still stuck maybe you could paste your code?

    Thanks
    Kris
    Kris,

    Thanks for replying. I modified the code as follows to reference only the specific text box, instead of the entire form:

    txtProblem.EnableSpellCheck()
    DirectCast(txtProblem.SpellCheck, SpellCheckTextBox).RenderCompatibility = True


    However, I still get the overlay effect:

    Spell Checked Text Box:
    Name:  capture 1.JPG
Views: 1382
Size:  19.4 KB

    Another form over top of that text box:
    Name:  capture 2.JPG
Views: 1322
Size:  15.8 KB

    Also, is there some cleanup I should be doing after my form is closed? When I open up another MDI form after closing the last one, I still get the "Cannot access a disposed object." error.

    System.ObjectDisposedException was unhandled
    Message=Cannot access a disposed object.
    Object name: 'RichTextBox'.
    Source=System.Windows.Forms
    ObjectName=RichTextBox
    StackTrace:
    at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
    at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
    at i00SpellCheck.SpellCheckFormExtension.ReloadSpellCheckControls(SpellCheckSettings SpellCheckSettings)
    at i00SpellCheck.SpellCheckFormExtension.LoadDictionary(Object oSpellCheckSettings)


    Thanks for any help you can provide. If we can't use the SpellCheck on this MDI app, we think we can still utilize it on some standard Windows form app.

  35. #155
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    482

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by i00 View Post
    Interesting I checked the speed on my i7 2.6 GHz and it the spell check engine checks at an average of 60.42 words per second... how many words are visible in your text box (it only checks visible words)?

    Even with 27 lines @ 7 words (189) words total, it should take about 3.5 seconds (after redraw time etc)...?!

    Can you post the tet in your text box here?

    Thanks
    Kris
    So I reran my tests using the contents of post #37 in THIS thread:
    http://www.vbforums.com/showthread.p...=1#post4089783

    Using your dictionary took 13 seconds, using the smaller Firefox dictionary took 6 seconds. I am running on significantly older equipment than you are so I am sure that is part of it.

    When you perform the spell check do you take each word, and the compare it to every word in the entire dictionary?

  36. #156

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by stru4nak View Post
    For latin language like brazilian who have special characters worked when you change encoding to UTF-8 but for cyrilic language like Macedonian, Russian, Serbian and etc doesn't work, it not show spell correction. So this spellchecker work only for English language.
    Probably the case, sorry but I am not familiar on how to load / save files that contain cyrilic characters from a file.

    The functions for loading / saving the dictionaries are in i00SpellCheck\Spell Check\Engine\Dictionary.vb, LoadFromFile() and Save().
    The offending lines (I think) are:
    Dim fileData = My.Computer.FileSystem.ReadAllText(Filename)
    and
    My.Computer.FileSystem.WriteAllText(...

    If anyone knows how to do this, please let me know

    Thanks
    Kris

  37. #157

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by rfreedlund View Post
    Kris,

    Thanks for replying. I modified the code as follows to reference only the specific text box, instead of the entire form:

    txtProblem.EnableSpellCheck()
    DirectCast(txtProblem.SpellCheck, SpellCheckTextBox).RenderCompatibility = True


    However, I still get the overlay effect:

    Spell Checked Text Box:
    Name:  capture 1.JPG
Views: 1382
Size:  19.4 KB

    Another form over top of that text box:
    Name:  capture 2.JPG
Views: 1322
Size:  15.8 KB

    Also, is there some cleanup I should be doing after my form is closed? When I open up another MDI form after closing the last one, I still get the "Cannot access a disposed object." error.

    System.ObjectDisposedException was unhandled
    Message=Cannot access a disposed object.
    Object name: 'RichTextBox'.
    Source=System.Windows.Forms
    ObjectName=RichTextBox
    StackTrace:
    at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
    at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
    at i00SpellCheck.SpellCheckFormExtension.ReloadSpellCheckControls(SpellCheckSettings SpellCheckSettings)
    at i00SpellCheck.SpellCheckFormExtension.LoadDictionary(Object oSpellCheckSettings)


    Thanks for any help you can provide. If we can't use the SpellCheck on this MDI app, we think we can still utilize it on some standard Windows form app.
    Sorry about not replying to this before, forgot about it ...

    OK ... I found out what the error was ... I had some code in there that never gets called ...
    I have fixed this bug and it will be in the next update ... but until then you can replace (or edit - change is in Maroon) the SpellCheck() function in i00SpellCheck\Spell Check\Engine\Extension.vb

    Code:
        <System.Runtime.CompilerServices.Extension()> _
        Public Function SpellCheck(ByVal sender As Control, Optional ByVal AutoCreate As Boolean = True, Optional ByVal SpellCheckSettings As SpellCheckSettings = Nothing) As SpellCheckControlBase
            If SpellCheckControls.ContainsKey(sender) Then
                'exists
    
            Else
                If AutoCreate Then
                    ''create SpellCheckControlBase object and send it back...
    
                    Static plugins As List(Of SpellCheckControlBase) = PluginManager(Of SpellCheckControlBase).GetPlugins
    
                    Dim AcceptedClass = (From xItem In plugins Where xItem.ControlType.IsAssignableFrom(sender.GetType)).FirstOrDefault
                    If AcceptedClass IsNot Nothing Then
                        Dim SpellCheckControlAddingEventArgs As New SpellCheckControlAddingEventArgs
                        RaiseEvent SpellCheckControlAdding(Nothing, SpellCheckControlAddingEventArgs)
    
                        If SpellCheckControlAddingEventArgs.Cancel = True Then
                            Return Nothing
                        End If
                        'create a new instance of the plugin class
                        Dim o = DirectCast(System.Activator.CreateInstance(AcceptedClass.GetType), SpellCheckControlBase) 'TryCast(AcceptedClass.CreateObject, SpellCheckControlBase)
                        If o IsNot Nothing Then
                            SpellCheckControls.Add(sender, o)
                            AddHandler sender.Disposed, AddressOf Control_Disposed
                            o.mc_Control = sender
                            o.DoLoad()
                            RaiseEvent SpellCheckControlAdded(Nothing, New SpellCheckControlAddedRemovedEventArgs With {.Control = sender})
                        Else
                            Return Nothing
                        End If
                    Else
                        'no plugins for this control type
                        Return Nothing
                    End If
                Else
                    'we don't want to automatically this control to check spelling, and it is not enabled already so return nothing
                    Return Nothing
                End If
            End If
            If SpellCheckSettings IsNot Nothing Then
                SpellCheckControls(sender).Settings = SpellCheckSettings
            End If
            Return SpellCheckControls(sender)
        End Function
    Also no cleanup is needed

    Kris

  38. #158

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by Maverickz View Post
    So I reran my tests using the contents of post #37 in THIS thread:
    http://www.vbforums.com/showthread.p...=1#post4089783

    Using your dictionary took 13 seconds, using the smaller Firefox dictionary took 6 seconds. I am running on significantly older equipment than you are so I am sure that is part of it.

    When you perform the spell check do you take each word, and the compare it to every word in the entire dictionary?
    There are two types of spell checking (Both functions are in i00SpellCheck\Spell Check\Engine\SpellCheck.vb)...



    You are talking about the correctness of a word.

    This is done in SpellCheckWord()...

    This does check if the word is in the dictionary of 150K words, with a few exceptions ... eg a word that is all caps is ignored, numbers etc.



    For the actual suggestions (this is done when right clicking on an incorrect word for eg)...

    This is done in SpellCheckSuggestions()

    It basically takes the whole dictionary and eliminates words based on certain rules, to make a smaller dictionary.

    Each word, in the smaller dictionary, is then given a "closeness" rating based on other rules, this is sorted and returned.

    Kris

  39. #159
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    482

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by i00 View Post
    There are two types of spell checking (Both functions are in i00SpellCheck\Spell Check\Engine\SpellCheck.vb)...

    You are talking about the correctness of a word.

    This is done in SpellCheckWord()...

    This does check if the word is in the dictionary of 150K words, with a few exceptions ... eg a word that is all caps is ignored, numbers etc.

    Kris
    I only briefly looked at the code, and it appears that you load the whole dictionary into an array. Could you build another array (letter, start position, end position) at the same time to indicate where each starting letter in main array begins and ends and then use those values in the for loop to only search words that begin with the same letter?

    For instance the first entry in the second array might be ("a", 1, 5790). So any words you are checking that start with the letter A would then only search the first 5790 words instead of all 150k before realizing that it was misspelled.

    This should cut processing time way down.
    Last edited by Maverickz; Aug 23rd, 2012 at 08:05 PM.

  40. #160

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,388

    Re: 20120625 - i00 .Net Spell Check - Code Project prize winner!

    Quote Originally Posted by Maverickz View Post
    I only briefly looked at the code, and it appears that you load the whole dictionary into an array. Could you build another array (letter, start position, end position) at the same time to indicate where each starting letter in main array begins and ends and then use those values in the for loop to only search words that begin with the same letter?

    For instance the first entry in the second array might be ("a", 1, 5790). So any words you are checking that start with the letter A would then only search the first 5790 words instead of all 150k before realizing that it was misspelled.

    This should cut processing time way down.
    Indexing like this is a good idea... I will put this in my todo list for the next update... will probably be about a week away... the only issue with this is that the dictionary would have to be kept in order ... but no biggie

    Thanks for the suggestion btw
    Kris

Page 4 of 8 FirstFirst 1234567 ... LastLast

Posting Permissions

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



Click Here to Expand Forum to Full Width