- 2.57.0 (latest)
- 2.56.0
- 2.55.0
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.5
- 2.6.2
- 2.5.1
- 2.4.3
- 2.3.1
- 2.2.1
- 2.1.9
public static final class OcrConfig.Builder extends GeneratedMessageV3.Builder<OcrConfig.Builder> implements OcrConfigOrBuilder
Config for Document OCR.
Protobuf type google.cloud.documentai.v1beta3.OcrConfig
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > OcrConfig.BuilderImplements
OcrConfigOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAdvancedOcrOptions(String value)
public OcrConfig.Builder addAdvancedOcrOptions(String value)
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Parameter | |
---|---|
Name | Description |
value | String The advancedOcrOptions to add. |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
addAdvancedOcrOptionsBytes(ByteString value)
public OcrConfig.Builder addAdvancedOcrOptionsBytes(ByteString value)
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes of the advancedOcrOptions to add. |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
addAllAdvancedOcrOptions(Iterable<String> values)
public OcrConfig.Builder addAllAdvancedOcrOptions(Iterable<String> values)
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Parameter | |
---|---|
Name | Description |
values | Iterable<String> The advancedOcrOptions to add. |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public OcrConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
build()
public OcrConfig build()
Returns | |
---|---|
Type | Description |
OcrConfig |
buildPartial()
public OcrConfig buildPartial()
Returns | |
---|---|
Type | Description |
OcrConfig |
clear()
public OcrConfig.Builder clear()
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
clearAdvancedOcrOptions()
public OcrConfig.Builder clearAdvancedOcrOptions()
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
clearComputeStyleInfo()
public OcrConfig.Builder clearComputeStyleInfo()
Turn on font id model and returns font style information.
bool compute_style_info = 8;
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
clearEnableImageQualityScores()
public OcrConfig.Builder clearEnableImageQualityScores()
Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR responses are of poor quality for a given input. Adds additional latency comparable to regular OCR to the process call.
bool enable_image_quality_scores = 4;
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
clearEnableNativePdfParsing()
public OcrConfig.Builder clearEnableNativePdfParsing()
Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.
bool enable_native_pdf_parsing = 3;
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
clearEnableSymbol()
public OcrConfig.Builder clearEnableSymbol()
Includes symbol level OCR information if set to true.
bool enable_symbol = 6;
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public OcrConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
clearHints()
public OcrConfig.Builder clearHints()
Hints for the OCR model.
.google.cloud.documentai.v1beta3.OcrConfig.Hints hints = 2;
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public OcrConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
clone()
public OcrConfig.Builder clone()
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
getAdvancedOcrOptions(int index)
public String getAdvancedOcrOptions(int index)
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
String | The advancedOcrOptions at the given index. |
getAdvancedOcrOptionsBytes(int index)
public ByteString getAdvancedOcrOptionsBytes(int index)
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
ByteString | The bytes of the advancedOcrOptions at the given index. |
getAdvancedOcrOptionsCount()
public int getAdvancedOcrOptionsCount()
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Returns | |
---|---|
Type | Description |
int | The count of advancedOcrOptions. |
getAdvancedOcrOptionsList()
public ProtocolStringList getAdvancedOcrOptionsList()
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Returns | |
---|---|
Type | Description |
ProtocolStringList | A list containing the advancedOcrOptions. |
getComputeStyleInfo()
public boolean getComputeStyleInfo()
Turn on font id model and returns font style information.
bool compute_style_info = 8;
Returns | |
---|---|
Type | Description |
boolean | The computeStyleInfo. |
getDefaultInstanceForType()
public OcrConfig getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
OcrConfig |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getEnableImageQualityScores()
public boolean getEnableImageQualityScores()
Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR responses are of poor quality for a given input. Adds additional latency comparable to regular OCR to the process call.
bool enable_image_quality_scores = 4;
Returns | |
---|---|
Type | Description |
boolean | The enableImageQualityScores. |
getEnableNativePdfParsing()
public boolean getEnableNativePdfParsing()
Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.
bool enable_native_pdf_parsing = 3;
Returns | |
---|---|
Type | Description |
boolean | The enableNativePdfParsing. |
getEnableSymbol()
public boolean getEnableSymbol()
Includes symbol level OCR information if set to true.
bool enable_symbol = 6;
Returns | |
---|---|
Type | Description |
boolean | The enableSymbol. |
getHints()
public OcrConfig.Hints getHints()
Hints for the OCR model.
.google.cloud.documentai.v1beta3.OcrConfig.Hints hints = 2;
Returns | |
---|---|
Type | Description |
OcrConfig.Hints | The hints. |
getHintsBuilder()
public OcrConfig.Hints.Builder getHintsBuilder()
Hints for the OCR model.
.google.cloud.documentai.v1beta3.OcrConfig.Hints hints = 2;
Returns | |
---|---|
Type | Description |
OcrConfig.Hints.Builder |
getHintsOrBuilder()
public OcrConfig.HintsOrBuilder getHintsOrBuilder()
Hints for the OCR model.
.google.cloud.documentai.v1beta3.OcrConfig.Hints hints = 2;
Returns | |
---|---|
Type | Description |
OcrConfig.HintsOrBuilder |
hasHints()
public boolean hasHints()
Hints for the OCR model.
.google.cloud.documentai.v1beta3.OcrConfig.Hints hints = 2;
Returns | |
---|---|
Type | Description |
boolean | Whether the hints field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(OcrConfig other)
public OcrConfig.Builder mergeFrom(OcrConfig other)
Parameter | |
---|---|
Name | Description |
other | OcrConfig |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public OcrConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public OcrConfig.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
mergeHints(OcrConfig.Hints value)
public OcrConfig.Builder mergeHints(OcrConfig.Hints value)
Hints for the OCR model.
.google.cloud.documentai.v1beta3.OcrConfig.Hints hints = 2;
Parameter | |
---|---|
Name | Description |
value | OcrConfig.Hints |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final OcrConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
setAdvancedOcrOptions(int index, String value)
public OcrConfig.Builder setAdvancedOcrOptions(int index, String value)
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
repeated string advanced_ocr_options = 5;
Parameters | |
---|---|
Name | Description |
index | int The index to set the value at. |
value | String The advancedOcrOptions to set. |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
setComputeStyleInfo(boolean value)
public OcrConfig.Builder setComputeStyleInfo(boolean value)
Turn on font id model and returns font style information.
bool compute_style_info = 8;
Parameter | |
---|---|
Name | Description |
value | boolean The computeStyleInfo to set. |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
setEnableImageQualityScores(boolean value)
public OcrConfig.Builder setEnableImageQualityScores(boolean value)
Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR responses are of poor quality for a given input. Adds additional latency comparable to regular OCR to the process call.
bool enable_image_quality_scores = 4;
Parameter | |
---|---|
Name | Description |
value | boolean The enableImageQualityScores to set. |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
setEnableNativePdfParsing(boolean value)
public OcrConfig.Builder setEnableNativePdfParsing(boolean value)
Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.
bool enable_native_pdf_parsing = 3;
Parameter | |
---|---|
Name | Description |
value | boolean The enableNativePdfParsing to set. |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
setEnableSymbol(boolean value)
public OcrConfig.Builder setEnableSymbol(boolean value)
Includes symbol level OCR information if set to true.
bool enable_symbol = 6;
Parameter | |
---|---|
Name | Description |
value | boolean The enableSymbol to set. |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public OcrConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
setHints(OcrConfig.Hints value)
public OcrConfig.Builder setHints(OcrConfig.Hints value)
Hints for the OCR model.
.google.cloud.documentai.v1beta3.OcrConfig.Hints hints = 2;
Parameter | |
---|---|
Name | Description |
value | OcrConfig.Hints |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
setHints(OcrConfig.Hints.Builder builderForValue)
public OcrConfig.Builder setHints(OcrConfig.Hints.Builder builderForValue)
Hints for the OCR model.
.google.cloud.documentai.v1beta3.OcrConfig.Hints hints = 2;
Parameter | |
---|---|
Name | Description |
builderForValue | OcrConfig.Hints.Builder |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public OcrConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final OcrConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
OcrConfig.Builder |