# Class TextRecognitionResult.TextBlock

java.lang.Object
com.codename1.ai.vision.TextRecognitionResult.TextBlock

Enclosing class:
  `TextRecognitionResult`

public static final class TextRecognitionResult.TextBlock extends Object
One recognized text block with confidence and normalized bounds.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TextBlock(String text, float confidence, VisionRect bounds, String languageTag)`
  Creates one OCR block.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VisionRect`
  `getBounds()`
  `float`
  `getConfidence()`
  `String`
  `getLanguageTag()`
  `String`
  `getText()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TextBlock

    public TextBlock(String text, float confidence, VisionRect bounds, String languageTag)
    Creates one OCR block.
    Parameters:
      `text` - recognized text
      `confidence` - recognition confidence in 0..1
      `bounds` - normalized block bounds
      `languageTag` - BCP-47 tag, or `null`

- ## Method Details

  - ### getText

    public String getText()
    Returns:
      recognized block text

  - ### getConfidence

    public float getConfidence()
    Returns:
      recognition confidence in the range 0..1

  - ### getBounds

    public VisionRect getBounds()
    Returns:
      normalized top-left-origin bounds

  - ### getLanguageTag

    public String getLanguageTag()
    Returns:
      BCP-47 language tag, or `null` when unavailable