From 4d18229320bb68b8dc6e7f676df6a6e75465aa17 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 24 Jan 2023 20:02:55 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20Tesseract=20OCR=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AE=89=E8=A3=85=E7=9A=84=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=8C=85=20Fix=20https://github.com/siyuan-note/siyuan/issues/?= =?UTF-8?q?7157?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/util/tesseract.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/kernel/util/tesseract.go b/kernel/util/tesseract.go index 3f433635e..deabd80e7 100644 --- a/kernel/util/tesseract.go +++ b/kernel/util/tesseract.go @@ -123,23 +123,6 @@ func initTesseract() { } } logging.LogInfof("tesseract-ocr enabled [ver=%s, langs=%s]", ver, strings.Join(TesseractLangs, "+")) - - if !gulu.Str.Contains("eng", TesseractLangs) { - logging.LogWarnf("no eng tesseract lang found") - return - } - - foundChi := false - for _, lang := range TesseractLangs { - if strings.Contains(lang, "chi") { - foundChi = true - break - } - } - if !foundChi { - logging.LogWarnf("no chi_* tesseract lang found") - return - } } func getTesseractVer() (ret string) {