Skip to content

Commit 58b1f65

Browse files
sivagaodehesa
authored andcommitted
Fix: ocr command by updating recognitionlangues params
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
1 parent 40ebc89 commit 58b1f65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commands/system/ocr.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Cocoa
2121
import Vision
2222

2323
let screenCapturePath = "/tmp/ocr.png"
24-
let recognitionLanguages = ["en-US", "zh-CN"]
24+
let recognitionLanguages = ["zh-Hans", "en-US"]
2525
let joiner = " "
2626

2727
@discardableResult

0 commit comments

Comments
 (0)