fix(tesseract/regex): add workaround for é, á and d

This commit is contained in:
tretrauit 2024-02-01 00:08:32 +07:00
parent e598e34d45
commit 5ae36d7f2a

View File

@ -170,6 +170,8 @@ pub fn regexify_text(text: &String) -> String {
ascii_text.push_str("[Il!1i]");
} else if ['o', 'c'].contains(&c) {
ascii_text.push_str("[oc]");
} else if ['é', 'á', 'd'].contains(&c) {
ascii_text.push_str("[éád]");
} else if ['.'].contains(&c) {
if prev_chars.len() > 3 {
let prev_char = prev_chars[prev_chars.len() - 1];