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
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
public TextExtractionAnnotation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public TextExtractionAnnotation build()
Returns
public TextExtractionAnnotation buildPartial()
Returns
public TextExtractionAnnotation.Builder clear()
Returns
Overrides
public TextExtractionAnnotation.Builder clearAnnotation()
Returns
public TextExtractionAnnotation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
public TextExtractionAnnotation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
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
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
public TextExtractionAnnotation.Builder clone()
Returns
Overrides
public TextExtractionAnnotation.AnnotationCase getAnnotationCase()
Returns
public TextExtractionAnnotation getDefaultInstanceForType()
Returns
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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.
|
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
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
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
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.
|
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public TextExtractionAnnotation.Builder mergeFrom(TextExtractionAnnotation other)
Parameter
Returns
public TextExtractionAnnotation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
public TextExtractionAnnotation.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
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
Returns
public final TextExtractionAnnotation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
public TextExtractionAnnotation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public TextExtractionAnnotation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
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
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
Returns
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
Returns
public final TextExtractionAnnotation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides