Skip to content

Commit

Permalink
🎨 桌面端支持搜索图片 OCR 文本 #3470
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 16, 2023
1 parent aa6f7c8 commit 8dd5903
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion kernel/util/tesseract.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,15 @@ func initTesseract() {
logging.LogWarnf("no eng tesseract lang found")
return
}
if !gulu.Str.Contains("chi_", langs) {

foundChi := false
for _, lang := range langs {
if strings.Contains(lang, "chi") {
foundChi = true
break
}
}
if !foundChi {
logging.LogWarnf("no chi_* tesseract lang found")
return
}
Expand Down

0 comments on commit 8dd5903

Please sign in to comment.