Darian Miller 361 Posted February 11, 2020 What do you use for Spell Checking VCL apps on Windows made by Delphi? There seems to be two commercial options left: https://www.devexpress.com/products/vcl/spell_checker/ Included in their $1500 subscription. Don't think I want to pay $1500 for a spellchecker. https://www.tmssoftware.com/site/tmsspellcheck.asp Available alone or in their subscriptions. I'm trying to get this to work now. The old standby hasn't been updated since 2015 and forums are overrun by spam. I assume these guys are no longer around? http://www.addictivesoftware.com/ Share this post Link to post
David Heffernan 2345 Posted February 12, 2020 http://hunspell.github.io/ 2 1 Share this post Link to post
Darian Miller 361 Posted February 12, 2020 I was just looking at that. Along with Rolliston's code: https://cc.embarcadero.com/item/27428 https://delphihaven.wordpress.com/2010/02/06/compiling-a-hunspell-dll-step-by-step/ Share this post Link to post
Darian Miller 361 Posted February 12, 2020 I did get a response out of Glenn Crouch @ AddictiveSoftware. Apparently still pumping out manual updates for the latest Delphi release. Share this post Link to post
Vincent Parrett 750 Posted February 12, 2020 I've used the addictive lib for many years, but it's become a problem for me while separating execution from UI code so I can get by app running on docker - the library is so tied up in the vcl that it's not usable from a console app. Sadly, it appears the devexpress and tms ones are also dependent on the vcl (layered api's people!) 1 Share this post Link to post
Tommi Prami 130 Posted February 12, 2020 Active Hunspell wrapper project would be cool. Jus saying... 🙂 Share this post Link to post
Fr0sT.Brutal 900 Posted February 12, 2020 1 hour ago, Tommi Prami said: Active Hunspell wrapper project would be cool. Jus saying... 🙂 https://github.com/hunspell/hunspell/blob/master/src/hunspell/hunspell.h contains about 10 functions, one of the most short APIs I ever seen xD 2 Share this post Link to post
Darian Miller 361 Posted February 12, 2020 10 hours ago, Tommi Prami said: Active Hunspell wrapper project would be cool. Jus saying... 🙂 Chris Rolliston's MPL source from Code Central is now on GitHub. You can help make it as active as you like. : ) https://github.com/darianmiller/Delphi-Hunspell Share this post Link to post
Darian Miller 361 Posted February 16, 2020 On 2/12/2020 at 10:04 AM, Darian Miller said: Chris Rolliston's MPL source from Code Central is now on GitHub. You can help make it as active as you like. : ) https://github.com/darianmiller/Delphi-Hunspell I put a few more items into this repo today: - Alternative implementation from https://www.helpandmanual.com/downloads_delphi.html - Newer Hunspell en_US dictionary from SCOWL (2019.10.06) - Newer Win32 version of libhunspell.dll , built today from 2019.11.12 source, along with two small PDF docs. I have a TFrame descendant that has the spell check functionality built-in, initially built for use with TMS components. TMS has an ISpell based spell checker component that hooks into their TAdvMemo component. It's pretty easy to replace their ISpell integration with a Hunspell integration using the CCR Hunspell unit. There are a lot of recently updated dictionaries available for use with Hunspell. ASpell as another option, with a lot of current dictionaries and there's also a spell checker API in WIndows 8+ as mentioned on StackOverflow, but I haven't investigated this much.. Share this post Link to post
Alexander Halser 26 Posted April 22, 2020 (edited) Quote Active Hunspell wrapper project would be cool. Jus saying... 🙂 Have a look at my NHunspell implementation (mentioned above as https://www.helpandmanual.com/downloads_delphi.html, but it's on SourceForge as well):https://sourceforge.net/projects/nhunspelldelphi/files/ It is a wrapper for NHunspell for Delphi 2007 up to the latest versions. And it includes a wrapper class for Addict v4 dictionaries. Hunspell is great, because it's open source and can use numerous dictionaries from OpenOffice. But Hunspell alone is missing a parser for the classes/controls used by many Delphi developers. Like a TRichview, just to name an example. The Addict spell checker is great, because it is a solid spelling checker with a full-fledged parser, has been around for quite a while and it enjoys support for almost every Delphi control you can think of. Just the dictionaries delivered with Addict were never really good. My goal back then was to combine the two, without having to rewrite everything spelling-check related. We keep using Addict as the spelling checker for everything it was used before. But we don't use the dictionaries. The component comes with an ad3MainDictionary.pas unit (which is, in fact, for Addict 4) and implements a new TMainDictionary (the Addict dictionary class), which redirects the generic functions to Hunspell. The unit needs to replace the original unit from Addict, or take precedence in your search path. The main dicts can be mixed with custom user-defined dictionaries from Addict and the spelling check function is fully transparent. The wrapper has been approved by Addictive Software for inclusion into the open source distribution, because this part of the package is actually not fully open. What it does Implements Hunspell for Delphi 2007 and up. Takes .OXT files as dictionaries, no need to unzip them. A simple zip reader and XML parser is part of the distribution. Supports spelling and hyphenation dictionaries (no Thesaurus) Optionally introduces a TMainDictionary wrapper to use it with the Addict Spelling checker So, if you have been using Addict (you need an Addict license, to use the Addict wrapper) you have the best of both worlds with this implementation. You can use Addict as your spell check engine without many changes, but run it with OpenOffice dictionaries. The hyphenation part is separate from Addict and needs to be applied manually. All the control parsers that were made for Addict, however, should be working fine. I haven't bothered to update the component on SourceForge. It has received a few internal tweaks in last couple of years - mostly strange OXT configurations, that we have come across. If you are going to use it, please PM me for an update. Edited April 22, 2020 by Alexander Halser 1 Share this post Link to post
Edwin Yip 154 Posted January 1, 2022 (edited) Very helpful and quite complete list and details about spell check libraries by Darian, thanks for sharing! I use the LS Spell Checker mentioned above in a project written in D7 (and contributed fixes back to Luzius the author in the past). Now I need a unicode version (for D2009 and above). I tried to modify it and it seems to be tricky since it mostly deals with character strings. So I wonder, if anyone has a unicode version of it and can you share it with the rest of us? And happy new year to every one in the forum! Edited January 1, 2022 by Edwin Yip Share this post Link to post
Edwin Yip 154 Posted January 13, 2022 So after: I failed to upgrade LS Speller to support Unicode Delphi, found that the TMS one from 2017 is not fast enough for me, none of the above mentioned Hunspell wrapper has a dialog which directly operates on TRichEdit/TMemo In the end I found on Torry.net another hunspell wrapper originally written by Stefan Ascher, and have upgraded to support Unicode Delphi. Check my new post if you are interested: 1 Share this post Link to post
Ian Branch 127 Posted January 18, 2022 Hi Team, FWIW I had been wanting to add spell checking to my Apps for some time (years) but never got around to it. 😞 Based on the @Alexander Halser post above I bit the bullet and purchased Addict 4, gulp! - AU$490, perhaps I should have waited for the exchange rate to improve..nahh, I should live that long, and installed and integrated NHunspell. Per his offer, Alexander was gracious enough to send me his current NHunspell files. Thanks Alexander. I contacted Glenn Crouch from ESBConsult and he sent me his current Addict4 files for D11. Thanks Glenn. They work for D10.4.2 as well. After a short learning curve I now have spell checking operational in my Apps. It was relatively painless. 🙂 My only question is about the currency of the actual dictionary .oxt files/data. The dict-en.oxt file I have suggests it is from July 2010. Is this still current or is there a more recent version? Is there any value in sourcing a more recent file? If so where from? I'm figuring it doesn't really matter, dictionaries wouldn't change all that much and any new words can be added as part of Addict's interface. Regards, Ian Share this post Link to post
pyscripter 689 Posted February 8, 2022 (edited) There were many options mentioned in this thread, but there was no mention of the most obvious one at least on Windows: the built-in Windows spellchecker available since Windows 8. There many advantages compared to the options discussed here. It is free. Very easy to use. Minimal code to add to your project. No need to distribute dictionaries. If the user wants a given language dictionary they can get it through Windows language settings. It persists words added, ignored and autocorrected. It detects duplicate words. I got the idea from Ian Boyed's answer in this Stackoverflow question, but I could not find a Delphi translation of the Windows Spellcheck API. So I created my own. It is included in the attached zip file, along with a demo program. SpellCheck.zip Edited February 8, 2022 by pyscripter 1 5 Share this post Link to post
Ian Branch 127 Posted February 8, 2022 Hi pyscripter, Thanks for the thought. Yes I was aware and I would have loved to use it, but regrettably my Users are still using Windows 7. :-( Nevertheless, should they ever update, I won't hold my breath, or I have a need elsewhere with Windows 8 or better OS, I will certainly entertain/use it. I have downloaded your SpellCheck.zip file. Thank you. Regards, Ian Share this post Link to post
Benoit 0 Posted August 29, 2022 (edited) Hi pyscripter, Thanks it's working great. Will use this solution in my interfaces. Regards, Ben Edited August 29, 2022 by Benoit Share this post Link to post
Schwarz 0 Posted May 11, 2023 Hello psyscripter, thank you very much for your SpellCheck.zip. It works great. Unfortunately I do not understand how to load the dictionaries. Can you give me an example for IUserDictionariesRegistrar? Thanks a lot Chris Share this post Link to post
pyscripter 689 Posted May 11, 2023 Dictionaries are downloaded via Windows Language preferences. You just select the language as in the demo. Share this post Link to post
Schwarz 0 Posted May 12, 2023 Thank you pyscripter, my problem was to get an instance of the interface. Now it works. SpellFactory.QueryInterface(IID_IUserDictionariesRegistrar, UserDictionariesRegistrar); Share this post Link to post