Skip to content

whitelist character does not work for 4.0 api #998

Description

@wosiu

tested 4.00.00alpha and master (2b854e3)
It does not take any effect when setting variable: "tessedit_char_whitelist" like:

pars_vec.push_back("tessedit_char_whitelist");
pars_values.push_back("1234567890");
api->Init(NULL, "eng", tesseract::OEM_LSTM_ONLY, NULL, 0, &pars_vec, &pars_values, false);

OR before init or after init:
api->SetVariable("tessedit_char_whitelist", "1234567890");

However when you change from OEM_LSTM_ONLY to OEM_TESSERACT_ONLY it works fine.

Same story for command line:
(for master) When you set in command line:
tesseract --oem 1 D1.png stdout -c tessedit_char_whitelist=1234567890
oem 1 means LSTM only - whitelist does not take effect
if you change oem to 0 (Original Tesseract Only) it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions