DocumentLanguage Class

An object representing the detected language for a given text span.

Inheritance
builtins.object
DocumentLanguage

Constructor

DocumentLanguage(**kwargs)

Variables

locale
str

Detected language code. Value may be an ISO 639-1 language code (ex. "en", "fr") or a BCP 47 language tag (ex. "zh-Hans").

spans
list[DocumentSpan]

Location of the text elements in the concatenated content that the language applies to.

confidence
float

Confidence of correctly identifying the language.

Methods

from_dict

Converts a dict in the shape of a DocumentLanguage to the model itself.

to_dict

Returns a dict representation of DocumentLanguage.

from_dict

Converts a dict in the shape of a DocumentLanguage to the model itself.

from_dict(data: dict) -> azure.ai.formrecognizer._models.DocumentLanguage

Parameters

data
dict
Required

A dictionary in the shape of DocumentLanguage.

data
Required

Returns

DocumentLanguage

Return type

to_dict

Returns a dict representation of DocumentLanguage.

to_dict() -> dict

Returns

dict

Return type