Partilhar via


DetectedTextWord Class

  • java.lang.Object
    • com.azure.ai.vision.imageanalysis.models.DetectedTextWord

Implements

public final class DetectedTextWord
implements JsonSerializable<DetectedTextWord>

A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word.

Method Summary

Modifier and Type Method and Description
static DetectedTextWord fromJson(JsonReader jsonReader)

Reads an instance of DetectedTextWord from the JsonReader.

List<ImagePoint> getBoundingPolygon()

Get the boundingPolygon property: A bounding polygon around the word.

double getConfidence()

Get the confidence property: The level of confidence that the word was detected.

String getText()

Get the text property: Text content of the word.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static DetectedTextWord fromJson(JsonReader jsonReader)

Reads an instance of DetectedTextWord from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DetectedTextWord if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getBoundingPolygon

public List getBoundingPolygon()

Get the boundingPolygon property: A bounding polygon around the word. At the moment only quadrilaterals are supported (represented by 4 image points).

Returns:

the boundingPolygon value.

getConfidence

public double getConfidence()

Get the confidence property: The level of confidence that the word was detected. Confidence scores span the range of 0.0 to 1.0 (inclusive), with higher values indicating a higher confidence of detection.

Returns:

the confidence value.

getText

public String getText()

Get the text property: Text content of the word.

Returns:

the text value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to