Class OcrConfig.Hints (2.28.0)

public static final class OcrConfig.Hints extends GeneratedMessageV3 implements OcrConfig.HintsOrBuilder

Hints for OCR Engine

Protobuf type google.cloud.documentai.v1.OcrConfig.Hints

Static Fields

LANGUAGE_HINTS_FIELD_NUMBER

public static final int LANGUAGE_HINTS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static OcrConfig.Hints getDefaultInstance()
Returns
TypeDescription
OcrConfig.Hints

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static OcrConfig.Hints.Builder newBuilder()
Returns
TypeDescription
OcrConfig.Hints.Builder

newBuilder(OcrConfig.Hints prototype)

public static OcrConfig.Hints.Builder newBuilder(OcrConfig.Hints prototype)
Parameter
NameDescription
prototypeOcrConfig.Hints
Returns
TypeDescription
OcrConfig.Hints.Builder

parseDelimitedFrom(InputStream input)

public static OcrConfig.Hints parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OcrConfig.Hints parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static OcrConfig.Hints parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OcrConfig.Hints parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OcrConfig.Hints parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OcrConfig.Hints parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OcrConfig.Hints parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OcrConfig.Hints parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static OcrConfig.Hints parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OcrConfig.Hints parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static OcrConfig.Hints parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OcrConfig.Hints parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OcrConfig.Hints
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<OcrConfig.Hints> parser()
Returns
TypeDescription
Parser<Hints>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public OcrConfig.Hints getDefaultInstanceForType()
Returns
TypeDescription
OcrConfig.Hints

getLanguageHints(int index)

public 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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The languageHints at the given index.

getLanguageHintsBytes(int index)

public 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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the languageHints at the given index.

getLanguageHintsCount()

public 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
TypeDescription
int

The count of languageHints.

getLanguageHintsList()

public ProtocolStringList 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
TypeDescription
ProtocolStringList

A list containing the languageHints.

getParserForType()

public Parser<OcrConfig.Hints> getParserForType()
Returns
TypeDescription
Parser<Hints>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public OcrConfig.Hints.Builder newBuilderForType()
Returns
TypeDescription
OcrConfig.Hints.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OcrConfig.Hints.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
OcrConfig.Hints.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public OcrConfig.Hints.Builder toBuilder()
Returns
TypeDescription
OcrConfig.Hints.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException