Interface OcrConfig.HintsOrBuilder (2.50.0)

public static interface OcrConfig.HintsOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getLanguageHints(int index)

public abstract String getLanguageHints(int index)

List of BCP-47 language codes to use for OCR. In most cases, not specifying it yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong).

repeated string language_hints = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The languageHints at the given index.

getLanguageHintsBytes(int index)

public abstract ByteString getLanguageHintsBytes(int index)

List of BCP-47 language codes to use for OCR. In most cases, not specifying it yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong).

repeated string language_hints = 1;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the languageHints at the given index.

getLanguageHintsCount()

public abstract int getLanguageHintsCount()

List of BCP-47 language codes to use for OCR. In most cases, not specifying it yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong).

repeated string language_hints = 1;

Returns
Type Description
int

The count of languageHints.

getLanguageHintsList()

public abstract List<String> getLanguageHintsList()

List of BCP-47 language codes to use for OCR. In most cases, not specifying it yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong).

repeated string language_hints = 1;

Returns
Type Description
List<String>

A list containing the languageHints.