Recognition languages

Contents
[ ]

Aspose.OCR for C++ can recognize a text in a large number of languages and all popular writing scripts, including texts with mixed languages.

To specify a language for recognition, provide one of the following values in language_alphabet property in recognition settings:

Value Language
language::none Extended Latin characters, including diacritics
language::bel Belorussian
language::bul Bulgarian
language::chi Chinese (more than 6,000 characters)
language::cze Czech
language::dan Danish
language::deu German
language::dum Dutch
language::eng English
language::est Estonian
language::fin Finnish
language::fra French
language::hin Hindi
language::ita Italian
language::kaz Kazakh
language::lav Latvian
language::lit Lithuanian
language::nor Norwegian
language::pol Polish
language::por Portuguese
language::rum Romanian
language::rus Russian
language::slk Slovak
language::slv Slovene
language::spa Spanish
language::srp Serbian
language::srp_hrv Serbo-Croatian
language::swe Swedish
language::ukr Ukrainian

If this parameter is omitted, the OCR engine will assume that the text is written in extended Latin.

Example

The following code sample demonstrates how to specify the recognition language:

// Provide the image
string file = "source.png";
AsposeOCRInput source;
source.url = file.c_str();
std::vector<AsposeOCRInput> content = { source };
// Set recognition language
RecognitionSettings settings;
settings.language_alphabet = language::ukr;
// Extract text from the image
auto result = asposeocr_recognize(content.data(), content.size(), settings);
// Output the recognized text
wchar_t* buffer = asposeocr_serialize_result(result, buffer_size, export_format::text);
std::wcout << std::wstring(buffer) << std::endl;