Class TextExtractionAnnotation.Builder (2.39.0)

public static final class TextExtractionAnnotation.Builder extends GeneratedMessageV3.Builder<TextExtractionAnnotation.Builder> implements TextExtractionAnnotationOrBuilder

Annotation for identifying spans of text.

Protobuf type google.cloud.automl.v1.TextExtractionAnnotation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TextExtractionAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

build()

public TextExtractionAnnotation build()
Returns
TypeDescription
TextExtractionAnnotation

buildPartial()

public TextExtractionAnnotation buildPartial()
Returns
TypeDescription
TextExtractionAnnotation

clear()

public TextExtractionAnnotation.Builder clear()
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

clearAnnotation()

public TextExtractionAnnotation.Builder clearAnnotation()
Returns
TypeDescription
TextExtractionAnnotation.Builder

clearField(Descriptors.FieldDescriptor field)

public TextExtractionAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TextExtractionAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

clearScore()

public TextExtractionAnnotation.Builder clearScore()

Output only. A confidence estimate between 0.0 and 1.0. A higher value means greater confidence in correctness of the annotation.

float score = 1;

Returns
TypeDescription
TextExtractionAnnotation.Builder

This builder for chaining.

clearTextSegment()

public TextExtractionAnnotation.Builder clearTextSegment()

An entity annotation will set this, which is the part of the original text to which the annotation pertains.

.google.cloud.automl.v1.TextSegment text_segment = 3;

Returns
TypeDescription
TextExtractionAnnotation.Builder

clone()

public TextExtractionAnnotation.Builder clone()
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

getAnnotationCase()

public TextExtractionAnnotation.AnnotationCase getAnnotationCase()
Returns
TypeDescription
TextExtractionAnnotation.AnnotationCase

getDefaultInstanceForType()

public TextExtractionAnnotation getDefaultInstanceForType()
Returns
TypeDescription
TextExtractionAnnotation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getScore()

public float getScore()

Output only. A confidence estimate between 0.0 and 1.0. A higher value means greater confidence in correctness of the annotation.

float score = 1;

Returns
TypeDescription
float

The score.

getTextSegment()

public TextSegment getTextSegment()

An entity annotation will set this, which is the part of the original text to which the annotation pertains.

.google.cloud.automl.v1.TextSegment text_segment = 3;

Returns
TypeDescription
TextSegment

The textSegment.

getTextSegmentBuilder()

public TextSegment.Builder getTextSegmentBuilder()

An entity annotation will set this, which is the part of the original text to which the annotation pertains.

.google.cloud.automl.v1.TextSegment text_segment = 3;

Returns
TypeDescription
TextSegment.Builder

getTextSegmentOrBuilder()

public TextSegmentOrBuilder getTextSegmentOrBuilder()

An entity annotation will set this, which is the part of the original text to which the annotation pertains.

.google.cloud.automl.v1.TextSegment text_segment = 3;

Returns
TypeDescription
TextSegmentOrBuilder

hasTextSegment()

public boolean hasTextSegment()

An entity annotation will set this, which is the part of the original text to which the annotation pertains.

.google.cloud.automl.v1.TextSegment text_segment = 3;

Returns
TypeDescription
boolean

Whether the textSegment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TextExtractionAnnotation other)

public TextExtractionAnnotation.Builder mergeFrom(TextExtractionAnnotation other)
Parameter
NameDescription
otherTextExtractionAnnotation
Returns
TypeDescription
TextExtractionAnnotation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TextExtractionAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TextExtractionAnnotation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

mergeTextSegment(TextSegment value)

public TextExtractionAnnotation.Builder mergeTextSegment(TextSegment value)

An entity annotation will set this, which is the part of the original text to which the annotation pertains.

.google.cloud.automl.v1.TextSegment text_segment = 3;

Parameter
NameDescription
valueTextSegment
Returns
TypeDescription
TextExtractionAnnotation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TextExtractionAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public TextExtractionAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TextExtractionAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides

setScore(float value)

public TextExtractionAnnotation.Builder setScore(float value)

Output only. A confidence estimate between 0.0 and 1.0. A higher value means greater confidence in correctness of the annotation.

float score = 1;

Parameter
NameDescription
valuefloat

The score to set.

Returns
TypeDescription
TextExtractionAnnotation.Builder

This builder for chaining.

setTextSegment(TextSegment value)

public TextExtractionAnnotation.Builder setTextSegment(TextSegment value)

An entity annotation will set this, which is the part of the original text to which the annotation pertains.

.google.cloud.automl.v1.TextSegment text_segment = 3;

Parameter
NameDescription
valueTextSegment
Returns
TypeDescription
TextExtractionAnnotation.Builder

setTextSegment(TextSegment.Builder builderForValue)

public TextExtractionAnnotation.Builder setTextSegment(TextSegment.Builder builderForValue)

An entity annotation will set this, which is the part of the original text to which the annotation pertains.

.google.cloud.automl.v1.TextSegment text_segment = 3;

Parameter
NameDescription
builderForValueTextSegment.Builder
Returns
TypeDescription
TextExtractionAnnotation.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final TextExtractionAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TextExtractionAnnotation.Builder
Overrides