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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, July 7, 2017 12:29:07 PM(UTC)

Nick  
Nick

Groups: Registered, Tech Support, Administrators
Posts: 161

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

The LEADTOOLS Advantage 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.

https://www.leadtools.com/help/leadtools/v19m/dh/fo/iocrspellcheckmanager-adduserwords.html

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.

https://www.leadtools.com/help/leadtools/v19m/dh/fo/iocrspellcheckmanager-getsupportedspelllanguages.html
https://www.leadtools.com/help/leadtools/v19m/dh/fo/iocrspellcheckmanager-isspelllanguagesupported.html

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

Code:

         using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, 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);
            }

            ocrEngine.Shutdown();
         } 


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".
https://www.leadtools.com/help/leadtools/v19m/dh/to/ocradvantageruntimefiles.html
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 

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-2024, Yet Another Forum.NET
This page was generated in 0.042 seconds.