Class TextExtractionAnnotation.Builder (2.44.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TextExtractionAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TextExtractionAnnotation.Builder
Overrides

build()

public TextExtractionAnnotation build()
Returns
Type Description
TextExtractionAnnotation

buildPartial()

public TextExtractionAnnotation buildPartial()
Returns
Type Description
TextExtractionAnnotation

clear()

public TextExtractionAnnotation.Builder clear()
Returns
Type Description
TextExtractionAnnotation.Builder
Overrides

clearAnnotation()

public TextExtractionAnnotation.Builder clearAnnotation()
Returns
Type Description
TextExtractionAnnotation.Builder

clearField(Descriptors.FieldDescriptor field)

public TextExtractionAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TextExtractionAnnotation.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TextExtractionAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
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
Type Description
TextExtractionAnnotation.Builder

clone()

public TextExtractionAnnotation.Builder clone()
Returns
Type Description
TextExtractionAnnotation.Builder
Overrides

getAnnotationCase()

public TextExtractionAnnotation.AnnotationCase getAnnotationCase()
Returns
Type Description
TextExtractionAnnotation.AnnotationCase

getDefaultInstanceForType()

public TextExtractionAnnotation getDefaultInstanceForType()
Returns
Type Description
TextExtractionAnnotation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the textSegment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TextExtractionAnnotation other)

public TextExtractionAnnotation.Builder mergeFrom(TextExtractionAnnotation other)
Parameter
Name Description
other TextExtractionAnnotation
Returns
Type Description
TextExtractionAnnotation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TextExtractionAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextExtractionAnnotation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TextExtractionAnnotation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value TextSegment
Returns
Type Description
TextExtractionAnnotation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TextExtractionAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TextExtractionAnnotation.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public TextExtractionAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TextExtractionAnnotation.Builder
Overrides

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

public TextExtractionAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value float

The score to set.

Returns
Type Description
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
Name Description
value TextSegment
Returns
Type Description
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
Name Description
builderForValue TextSegment.Builder
Returns
Type Description
TextExtractionAnnotation.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final TextExtractionAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TextExtractionAnnotation.Builder
Overrides