目录

class info
com.huawei.hms.mlsdk.document.MLDocumentSetting

Sets the attributes of the document analyzer (MLDocumentAnalyzer). The attributes of the analyzer include:

1. Preset languages: Set languages for the analyzer correctly to ensure fast and accurate detection.

2. Whether to enable certificate fingerprint verification: If this parameter is set to true, only apps that pass the verification are allowed to access the cloud API for document detection.

3. Type of the text line bounding box. The value can be NGON or ARC. NGON: Returns the coordinates of the four corner points of the text line bounding box that is a quadrilateral.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.

Public Method Summary

Return typeMethod name
booleanequals(Object setting)
StringgetBorderType()
List<String>getLanguageList()
inthashCode()
booleanisEnableFingerprintVerification()

Public Methods

Method
public boolean equals(Object setting)
Determines whether the input instance is equal to the current instance.

Parameters

Parameter nameParameter desc
settingInstance to be compared.

Return

Typedesc
boolean

true: The instances are equal.

false: The instances are not equal.

Method
public String getBorderType()
Obtains the type of the text line bounding box.

Return

Typedesc
String

Returns the type of the text line bounding box.

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

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.

Method
public List<String> getLanguageList()
Obtains the languages preset in the document analyzer.

Return

Typedesc
List

Returns 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).

Method
public int hashCode()
Obtains the hash value of the current instance.

Return

Typedesc
intReturns the hash value of the instance.
Method
public final boolean isEnableFingerprintVerification()
Determines whether to enable certificate fingerprint verification.

Return

Typedesc
boolean

true: Certificate fingerprint verification is enabled. Only registered apps that pass the verification are allowed to access the cloud API for document detection.

false: Certificate fingerprint verification is disabled. There is no restriction on access to the cloud API for document detection.