Except from Predefined Text Languages to get only digits in final output I am using following code but output contains alphabets and symbols.

    HRESULT res;
    CSafePtr<IBaseLanguage> baseLanguage;
    res = engine->CreateBaseLanguage(&baseLanguage);

    res = baseLanguage->put_LetterSet(BLLS_Alphabet, CBstr(L"0123456789"));

    CSafePtr<ITextLanguage> textLanguage;
    res = engine->CreateTextLanguage(&textLanguage);

    CSafePtr<IBaseLanguages> baseLanguages;
    res = textLanguage->get_BaseLanguages(&baseLanguages);
    res = baseLanguages->Add(baseLanguage);
    res = baseLanguages->Item(0, &baseLanguage);
res = engine->CreatePageProcessingParams(&pageProcessingParams);
        CSafePtr<IRecognizerParams> recognizerParams;
        res = pageProcessingParams->get_RecognizerParams(&recognizerParams);
        res = recognizerParams->get_TextLanguage(&textLanguage);

asked 11 Jun '14, 16:59

Nitya's gravatar image


edited 10 Mar, 14:47

Oksana%20Serdyuk's gravatar image

Oksana Serdyuk ♦♦

English is the default recognition language. If you want to change the default recognition language, you'd better use the SetPredefinedTextLanguage method of the RecognizerParams object.

In you code snippet you just add your language to a collection of base languages. How to create and set custom language please find in Help → Guided Tour → Advanced Techniques → Working with Languages and also in code samples: CustomLanguage.

But when you set language which contains only digits and there are some letter on the image, FRE will try to recognize letters as some digits.

You could select from your document digits in post-processing.


answered 19 Jun '14, 16:07

SDK_support's gravatar image

SDK_support ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 11 Jun '14, 16:59

Seen: 873 times

Last updated: 10 Mar, 14:47

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal