OCR Get Available Languages
OCR Get Available Languages
Section titled “OCR Get Available Languages”Type: ocr-get-languages · Package: OCR Activities v1.2.5 · Output: List<string>
Returns the list of Tesseract language codes available in the package (e.g. eng, spa). Useful to check, before processing, that the language you need is installed.
How it works
Section titled “How it works”Checks the language files (.traineddata) that the package brings on the robot’s machine and returns their codes in alphabetical order. The package includes eng (English) and spa (Spanish). It does not run OCR and is instant.
Required parameters
Section titled “Required parameters”None.
Optional parameters
Section titled “Optional parameters”None.
Output
Section titled “Output”Returns a List of language codes (string), for example ["eng", "spa"]. If the package’s language folder does not exist on the machine (incomplete installation), it returns an empty list.
Example
Section titled “Example”OCR Get Available Languages → output: languagesIf condition = !languages.Contains("spa") └─ then: Throw message = "The 'spa' language is not available for OCR on this robot"Common errors
Section titled “Common errors”This activity practically never fails: in the worst case it returns an empty list.
Related activities
Section titled “Related activities”- OCR Recognize File — use one of these languages in
language.