DocumentLanguage Class
- java.
lang. Object - com.
azure. ai. documentintelligence. models. DocumentLanguage
- com.
Implements
public final class DocumentLanguage
implements JsonSerializable<DocumentLanguage>
An object representing the detected language for a given text span.
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Document |
fromJson(JsonReader jsonReader)
Reads an instance of Document |
double |
getConfidence()
Get the confidence property: Confidence of correctly identifying the language. |
String |
getLocale()
Get the locale property: Detected language. |
List<Document |
getSpans()
Get the spans property: Location of the text elements in the concatenated content the language applies to. |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static DocumentLanguage fromJson(JsonReader jsonReader)
Reads an instance of DocumentLanguage from the JsonReader.
Parameters:
Returns:
Throws:
getConfidence
public double getConfidence()
Get the confidence property: Confidence of correctly identifying the language.
Returns:
getLocale
public String getLocale()
Get the locale property: Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") or BCP 47 language tag (ex. "zh-Hans").
Returns:
getSpans
public List
Get the spans property: Location of the text elements in the concatenated content the language applies to.
Returns:
toJson
Applies to
Azure SDK for Java