Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, April 2, 2020 11:48:41 AM(UTC)


Groups: Registered, Tech Support, Administrators
Posts: 153

Was thanked: 9 time(s) in 9 post(s)

The LEADTOOLS LEAD OCR engine comes with a default spellcheck dictionary consisting of words, phrases, and letter combinations. This dictionary can be extended by using the IOcrSpellCheckManager.AddUserWords() method.


This method accepts parameters specifying what language the words are in and an array containing the words to be added. Note only languages currently installed can have words added. The IOcrSpellCheckManager.GetSupportedSpellLanguages() method enumerates these and IOcrSpellCheckManager.IsSpellLanguageSupported() returns a value based on the specified one.


Here's a code snippet which shows determining a language is present and updating its dictionary accordingly:


         using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, false))
            ocrEngine.Startup(null, null, null, null);
            IOcrSpellCheckManager spellCheckManager = ocrEngine.SpellCheckManager;
            string en = "en";

            if (spellCheckManager.IsSpellLanguageSupported(en))
               string[] wordsToAdd = { "LEADTOOLS", "OCR" };
               spellCheckManager.AddUserWords(en, wordsToAdd);


Note that the appropriate dictionary must be deployed for the language. We have these listed in our documentation on "OCR Files to be Included with your Application".

Edited by user Tuesday, March 22, 2022 7:51:01 AM(UTC)  | Reason: Updated links to v22

Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.127 seconds.