public static final class OcrParams.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder> implements OcrParamsOrBuilder
Parameters to control Optical Character Recognition (OCR) behavior.Protobuf type
google.cloud.documentai.v1beta2.OcrParams| Modifier and Type | Method and Description |
|---|---|
OcrParams.Builder |
addAllLanguageHints(Iterable<String> values)
List of languages to use for OCR.
|
OcrParams.Builder |
addLanguageHints(String value)
List of languages to use for OCR.
|
OcrParams.Builder |
addLanguageHintsBytes(com.google.protobuf.ByteString value)
List of languages to use for OCR.
|
OcrParams.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
OcrParams |
build() |
OcrParams |
buildPartial() |
OcrParams.Builder |
clear() |
OcrParams.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
OcrParams.Builder |
clearLanguageHints()
List of languages to use for OCR.
|
OcrParams.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
OcrParams.Builder |
clone() |
OcrParams |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getLanguageHints(int index)
List of languages to use for OCR.
|
com.google.protobuf.ByteString |
getLanguageHintsBytes(int index)
List of languages to use for OCR.
|
int |
getLanguageHintsCount()
List of languages to use for OCR.
|
com.google.protobuf.ProtocolStringList |
getLanguageHintsList()
List of languages to use for OCR.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
OcrParams.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
OcrParams.Builder |
mergeFrom(com.google.protobuf.Message other) |
OcrParams.Builder |
mergeFrom(OcrParams other) |
OcrParams.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
OcrParams.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
OcrParams.Builder |
setLanguageHints(int index,
String value)
List of languages to use for OCR.
|
OcrParams.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
OcrParams.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic OcrParams build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic OcrParams buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic OcrParams.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<OcrParams.Builder>public OcrParams.Builder mergeFrom(OcrParams other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public OcrParams.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<OcrParams.Builder>IOExceptionpublic com.google.protobuf.ProtocolStringList 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;getLanguageHintsList in interface OcrParamsOrBuilderpublic 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;getLanguageHintsCount in interface OcrParamsOrBuilderpublic 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;getLanguageHints in interface OcrParamsOrBuilderindex - The index of the element to return.public com.google.protobuf.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;getLanguageHintsBytes in interface OcrParamsOrBuilderindex - The index of the value to return.public OcrParams.Builder setLanguageHints(int index, String value)
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;index - The index to set the value at.value - The languageHints to set.public OcrParams.Builder addLanguageHints(String value)
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;value - The languageHints to add.public OcrParams.Builder addAllLanguageHints(Iterable<String> values)
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;values - The languageHints to add.public OcrParams.Builder clearLanguageHints()
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;public OcrParams.Builder addLanguageHintsBytes(com.google.protobuf.ByteString value)
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;value - The bytes of the languageHints to add.public final OcrParams.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>public final OcrParams.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<OcrParams.Builder>Copyright © 2024 Google LLC. All rights reserved.