我使用tesseract的C#包装器 - charlesw。并且无法理解,为什么字典验证不起作用。如何启用字典验证?例如" EXOMPLE" - 不是词典单词,更改"示例"
TesseractEngine engine = new TesseractEngine(@"tessdata/", "rus", EngineMode.TesseractOnly);
engine.SetVariable("tessedit_char_whitelist", whiteList);
// Tesseract Settings
engine.SetVariable("language_model_penalty_non_dict_word", 0.65);
engine.SetVariable("language_model_penalty_non_freq_dict_word", 0.6);
答案 0 :(得分:0)
Charles在构造函数中添加“config”参数。现在我们可以使用字典验证
TesseractEngine engine = new TesseractEngine(@"tessdata/", "rus", EngineMode.TesseractOnly, "config");
配置:
load_system_dawg F
load_freq_dawg F
user_words_suffix user-words
user_patterns_suffix user-patterns