From 58b1f657fa0d19b65f4dad0c33f11e0f4206aa9c Mon Sep 17 00:00:00 2001 From: siva Date: Sat, 22 Jun 2024 16:19:22 +0900 Subject: [PATCH] Fix: ocr command by updating recognitionlangues params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To recognize traditional and simplified Chinese, specify zh-Hant and zh-Hans as the first elements in the request’s recognitionLanguages property. English is the only other language that you can pair with Chinese. https://developer.apple.com/documentation/vision/original_objective-c_and_swift_api/recognizing_text_in_images --- commands/system/ocr.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/system/ocr.swift b/commands/system/ocr.swift index 2b8d37df4..cb22349e7 100755 --- a/commands/system/ocr.swift +++ b/commands/system/ocr.swift @@ -21,7 +21,7 @@ import Cocoa import Vision let screenCapturePath = "/tmp/ocr.png" -let recognitionLanguages = ["en-US", "zh-CN"] +let recognitionLanguages = ["zh-Hans", "en-US"] let joiner = " " @discardableResult