From 84746157e0a1f2996bf8da3a0f776a624226b2ef Mon Sep 17 00:00:00 2001 From: Norbert Klockiewicz Date: Mon, 26 May 2025 16:36:38 +0200 Subject: [PATCH] docs: improve ocr docs by adding information on using different languages --- docs/docs/computer-vision/useOCR.md | 18 ++++++++++++++++++ docs/docs/computer-vision/useVerticalOCR.md | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/docs/docs/computer-vision/useOCR.md b/docs/docs/computer-vision/useOCR.md index a4d7a5195..769eff842 100644 --- a/docs/docs/computer-vision/useOCR.md +++ b/docs/docs/computer-vision/useOCR.md @@ -216,6 +216,24 @@ function App() { } ``` +## Language-Specific Recognizers + +Each supported language requires its own set of recognizer models. +The built-in constants such as `RECOGNIZER_EN_CRNN_512`, `RECOGNIZER_PL_CRNN_256`, etc., point to specific models trained for a particular language. + +> For example: +> +> - To recognize **English** text, use: +> - `RECOGNIZER_EN_CRNN_512` +> - `RECOGNIZER_EN_CRNN_256` +> - `RECOGNIZER_EN_CRNN_128` +> - To recognize **Polish** text, use: +> - `RECOGNIZER_PL_CRNN_512` +> - `RECOGNIZER_PL_CRNN_256` +> - `RECOGNIZER_PL_CRNN_128` + +You need to make sure the recognizer models you pass in `recognizerSources` match the `language` you specify. + ## Supported languages | Language | Code Name | diff --git a/docs/docs/computer-vision/useVerticalOCR.md b/docs/docs/computer-vision/useVerticalOCR.md index 0e99f31c0..10ee9b19b 100644 --- a/docs/docs/computer-vision/useVerticalOCR.md +++ b/docs/docs/computer-vision/useVerticalOCR.md @@ -236,6 +236,22 @@ function App() { } ``` +## Language-Specific Recognizers + +Each supported language requires its own set of recognizer models. +The built-in constants such as `RECOGNIZER_EN_CRNN_512`, `RECOGNIZER_PL_CRNN_64`, etc., point to specific models trained for a particular language. + +> For example: +> +> - To recognize **English** text, use: +> - `RECOGNIZER_EN_CRNN_512` +> - `RECOGNIZER_EN_CRNN_64` +> - To recognize **Polish** text, use: +> - `RECOGNIZER_PL_CRNN_512` +> - `RECOGNIZER_PL_CRNN_64` + +You need to make sure the recognizer models you pass in `recognizerSources` match the `language` you specify. + ## Supported languages | Language | Code Name |