目录

class info
com.huawei.hms.mlsdk.document.MLDocumentSetting.Factory
Creates an instance of the document analysis configurator to set document detection attributes.

Public Constructor Summary

Constructor name

Factory()

Creates an instance of the document analysis configurator.

Public Method Summary

Return typeMethod name
MLDocumentSettingcreate()
MLDocumentSetting.FactoryenableFingerprintVerification()
MLDocumentSetting.FactorysetBorderType(String borderType)
MLDocumentSetting.FactorysetLanguageList(List<String> languages)

Public Constructors

Method
public Factory()
Creates an instance of the document analysis configurator.

Public Methods

Method
public MLDocumentSetting create()
Creates an instance of the document analysis configurator.

Return

Typedesc
MLDocumentSettingReturns the instance of the text analysis configurator MLDocumentSetting.
Method
public MLDocumentSetting.Factory enableFingerprintVerification()
Sets whether to enable certificate fingerprint verification. Only registered apps that pass the verification can access the cloud API for document detection. There is no need to set this parameter during app debugging.

Return

Typedesc
MLDocumentSetting.FactoryReturns the instance of MLDocumentSetting.Factory.
Method
public MLDocumentSetting.Factory setBorderType(String borderType)
Sets the type of the text bounding box.

Parameters

Parameter nameParameter desc
borderType

1. NGON: Returns the coordinates of the four corner points of the text line bounding box that is a quadrilateral;

2. ARC: Returns the coordinates of up to 72 corner points of the text line bounding box that is a polygon for text in a curved layout.

Return

Typedesc
MLDocumentSetting.FactoryReturns the instance of MLDocumentSetting.Factory.
Method
public MLDocumentSetting.Factory setLanguageList(List
Sets the preset languages. Correct language setting ensures fast and accurate detection. Do not set this parameter if languages are not determined. The service will automatically identify the languages. The analyzer currently supports 19 languages: Chinese, Japanese, Korean, English, French, German, Russian, Italian, Portuguese, Spanish, Polish, Norwegian, Swedish, Danish, Turkish, Finnish, Thai, Arabic, and Hindi.

Parameters

Parameter nameParameter desc
languagesReturns a list of languages.Language codes: en (English), zh (Chinese), ja (Japanese), ko (Korean), ru (Russian), de (German), fr (French), it (Italian), pt (Portuguese), es (Spanish), pl (Polish), no (Norwegian), sv (Swedish), da (Danish), tr (Turkish), fi (Finnish), th (Thai), ar (Arabic), and hi (Hindi)

Return

Typedesc
MLDocumentSetting.FactoryReturns the instance of MLDocumentSetting.Factory.