How to set load_system_dawg
and load_freq_dawg
to false
??
I need to disable the dictionary.. So I guess these are the two parameteres I need to set to false?
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI(); if(api->Init(NULL, "dan+eng")){ // error } api->SetImage(image); api->Recognize(0);
tesseract 3.05.01
1 Answers
Answers 1
- In your
tessdata
directory create aconfigs
directory - Create a file config (you will pass name of config file later in code)
- Fill your config file with following text
load_system_dawg F load_freq_dawg F
Modify your code
auto numOfConfigs = 1; auto **configs = new char *[numOfConfigs]; configs[i] = (char *) "name of your config file"; tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI(); if(api->Init(NULL, "dan+eng", tesseract::OEM_DEFAULT, configs, numOfConfigs, nullptr, nullptr, false)){ // error }
P.S. It is also possible to do with last couple of arguments of Init function, feel free to try them out yourself.
0 comments:
Post a Comment