| class info |
| com.huawei.hms.mlsdk.text.MLLocalTextSetting.Factory |
| Creates an instance of the on-device text analysis configurator to set on-device text detection attributes. |
| Return type | Method name |
| MLLocalTextSetting | create() |
| MLLocalTextSetting.Factory | setLanguage(String language) |
| MLLocalTextSetting.Factory | setOCRMode(int ocrMode) |
| Method |
| public MLLocalTextSetting create() |
| Creates an instance of the text analysis configurator. |
Return
| Type | desc |
| MLLocalTextSetting | Returns the instance of the text analysis configurator MLLocalTextSetting. |
| Method |
| public MLLocalTextSetting.Factory setLanguage(String language) |
| Sets languages for the analyzer. The default setting is rm (Romance languages). |
Parameters
| Parameter name | Parameter desc |
| language | Language codes. Supported languages: en (English), zh (Chinese), ja (Japanese), ko (Korean), ru (Russian), de (German), fr (French), it (Italian), pt (Portuguese), and es (Spanish) |
Return
| Type | desc |
| MLLocalTextSetting.Factory | Returns the instance of MLLocalTextSetting.Factory. |
| Method |
| public MLLocalTextSetting.Factory setOCRMode(int ocrMode) |
| Sets the text detection mode. The analyzer calls an appropriate API for text detection based on the detection mode. |
Parameters
| Parameter name | Parameter desc |
| ocrMode | Text detection mode. 1: OCR_DETECT_MODE, indicating the independent detection mode 2: OCR_TRACKING_MODE, indicating the tracking mode |
Return
| Type | desc |
| MLLocalTextSetting.Factory | MLLocalTextSetting.Factory instance. |