feat(ocr): expose rec_keys_path in RapidOcrOptions to support custom dictionaries (#786)
* Expose `rec_keys_path` in RapidOcrOptions to support custom dictionaries - Added `rec_keys_path` to `RapidOcrOptions` to align with RapidOCR's capability to use custom character dictionaries. - Passed `rec_keys_path` to `RapidOcrModel` initialization, ensuring the recognition model can load the correct dictionary (e.g., for Latin characters). Signed-off-by: Yorick Terweijden <yorick@spread.ai> * style(rapidocr-options): fix alignment of `rec_keys_path` comment Adjusted the alignment of the comment for `rec_keys_path` to maintain consistent formatting. No functional changes were made. Signed-off-by: Yorick Terweijden <yorick@spread.ai> --------- Signed-off-by: Yorick Terweijden <yorick@spread.ai>
This commit is contained in:
committed by
GitHub
parent
9022c6d855
commit
53327552e8
@@ -119,6 +119,7 @@ class RapidOcrOptions(OcrOptions):
|
||||
det_model_path: Optional[str] = None # same default as rapidocr
|
||||
cls_model_path: Optional[str] = None # same default as rapidocr
|
||||
rec_model_path: Optional[str] = None # same default as rapidocr
|
||||
rec_keys_path: Optional[str] = None # same default as rapidocr
|
||||
|
||||
model_config = ConfigDict(
|
||||
extra="forbid",
|
||||
|
||||
Reference in New Issue
Block a user