Send feedback
Class TextClassificationConfig.Builder (0.133.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.133.0 keyboard_arrow_down
public static final class TextClassificationConfig . Builder extends GeneratedMessageV3 . Builder<TextClassificationConfig . Builder > implements TextClassificationConfigOrBuilder
Config for text classification human labeling task.
Protobuf type google.cloud.datalabeling.v1beta1.TextClassificationConfig
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public TextClassificationConfig . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Overrides
build()
public TextClassificationConfig build ()
buildPartial()
public TextClassificationConfig buildPartial ()
clear()
public TextClassificationConfig . Builder clear ()
Overrides
clearAllowMultiLabel()
public TextClassificationConfig . Builder clearAllowMultiLabel ()
Optional. If allow_multi_label is true, contributors are able to choose
multiple labels for one text segment.
bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];
clearAnnotationSpecSet()
public TextClassificationConfig . Builder clearAnnotationSpecSet ()
Required. Annotation spec set resource name.
string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
clearField(Descriptors.FieldDescriptor field)
public TextClassificationConfig . Builder clearField ( Descriptors . FieldDescriptor field )
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public TextClassificationConfig . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Overrides
clearSentimentConfig()
public TextClassificationConfig . Builder clearSentimentConfig ()
Optional. Configs for sentiment selection.
.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
clone()
public TextClassificationConfig . Builder clone ()
Overrides
getAllowMultiLabel()
public boolean getAllowMultiLabel ()
Optional. If allow_multi_label is true, contributors are able to choose
multiple labels for one text segment.
bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description boolean
The allowMultiLabel.
getAnnotationSpecSet()
public String getAnnotationSpecSet ()
Required. Annotation spec set resource name.
string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
Returns Type Description String
The annotationSpecSet.
getAnnotationSpecSetBytes()
public ByteString getAnnotationSpecSetBytes ()
Required. Annotation spec set resource name.
string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
Returns Type Description ByteString
The bytes for annotationSpecSet.
getDefaultInstanceForType()
public TextClassificationConfig getDefaultInstanceForType ()
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Overrides
getSentimentConfig()
public SentimentConfig getSentimentConfig ()
Optional. Configs for sentiment selection.
.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
getSentimentConfigBuilder()
public SentimentConfig . Builder getSentimentConfigBuilder ()
Optional. Configs for sentiment selection.
.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
getSentimentConfigOrBuilder()
public SentimentConfigOrBuilder getSentimentConfigOrBuilder ()
Optional. Configs for sentiment selection.
.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
hasSentimentConfig()
public boolean hasSentimentConfig ()
Optional. Configs for sentiment selection.
.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns Type Description boolean
Whether the sentimentConfig field is set.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
mergeFrom(TextClassificationConfig other)
public TextClassificationConfig . Builder mergeFrom ( TextClassificationConfig other )
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public TextClassificationConfig . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Overrides
mergeFrom(Message other)
public TextClassificationConfig . Builder mergeFrom ( Message other )
Parameter Name Description other
Message
Overrides
mergeSentimentConfig(SentimentConfig value)
public TextClassificationConfig . Builder mergeSentimentConfig ( SentimentConfig value )
Optional. Configs for sentiment selection.
.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
mergeUnknownFields(UnknownFieldSet unknownFields)
public final TextClassificationConfig . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Overrides
setAllowMultiLabel(boolean value)
public TextClassificationConfig . Builder setAllowMultiLabel ( boolean value )
Optional. If allow_multi_label is true, contributors are able to choose
multiple labels for one text segment.
bool allow_multi_label = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter Name Description value
boolean
The allowMultiLabel to set.
setAnnotationSpecSet(String value)
public TextClassificationConfig . Builder setAnnotationSpecSet ( String value )
Required. Annotation spec set resource name.
string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter Name Description value
String
The annotationSpecSet to set.
setAnnotationSpecSetBytes(ByteString value)
public TextClassificationConfig . Builder setAnnotationSpecSetBytes ( ByteString value )
Required. Annotation spec set resource name.
string annotation_spec_set = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter Name Description value
ByteString
The bytes for annotationSpecSet to set.
setField(Descriptors.FieldDescriptor field, Object value)
public TextClassificationConfig . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public TextClassificationConfig . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Overrides
setSentimentConfig(SentimentConfig value)
public TextClassificationConfig . Builder setSentimentConfig ( SentimentConfig value )
Optional. Configs for sentiment selection.
.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
setSentimentConfig(SentimentConfig.Builder builderForValue)
public TextClassificationConfig . Builder setSentimentConfig ( SentimentConfig . Builder builderForValue )
Optional. Configs for sentiment selection.
.google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3 [(.google.api.field_behavior) = OPTIONAL];
setUnknownFields(UnknownFieldSet unknownFields)
public final TextClassificationConfig . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]