Interface OcrParamsOrBuilder (2.8.0)

public interface OcrParamsOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getLanguageHints(int index)

public abstract String getLanguageHints(int index)

List of languages to use for OCR. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_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). Document processing returns an error if one or more of the specified languages is not one of the supported languages.

repeated string language_hints = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The languageHints at the given index.

getLanguageHintsBytes(int index)

public abstract ByteString getLanguageHintsBytes(int index)

List of languages to use for OCR. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_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). Document processing returns an error if one or more of the specified languages is not one of the supported languages.

repeated string language_hints = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the languageHints at the given index.

getLanguageHintsCount()

public abstract int getLanguageHintsCount()

List of languages to use for OCR. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_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). Document processing returns an error if one or more of the specified languages is not one of the supported languages.

repeated string language_hints = 1;

Returns
TypeDescription
int

The count of languageHints.

getLanguageHintsList()

public abstract List<String> getLanguageHintsList()

List of languages to use for OCR. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_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). Document processing returns an error if one or more of the specified languages is not one of the supported languages.

repeated string language_hints = 1;

Returns
TypeDescription
List<String>

A list containing the languageHints.