Class PartOfSpeech.Builder (2.52.0)

publicstaticfinalclass PartOfSpeech.BuilderextendsGeneratedMessageV3.Builder<PartOfSpeech.Builder>implementsPartOfSpeechOrBuilder

Represents part of speech information for a token.

Protobuf type google.cloud.language.v1beta2.PartOfSpeech

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicPartOfSpeech.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PartOfSpeech.Builder
Overrides

build()

publicPartOfSpeechbuild()
Returns
Type Description
PartOfSpeech

buildPartial()

publicPartOfSpeechbuildPartial()
Returns
Type Description
PartOfSpeech

clear()

publicPartOfSpeech.Builderclear()
Returns
Type Description
PartOfSpeech.Builder
Overrides

clearAspect()

publicPartOfSpeech.BuilderclearAspect()

The grammatical aspect.

.google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearCase()

publicPartOfSpeech.BuilderclearCase()

The grammatical case.

.google.cloud.language.v1beta2.PartOfSpeech.Case case = 3;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicPartOfSpeech.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
PartOfSpeech.Builder
Overrides

clearForm()

publicPartOfSpeech.BuilderclearForm()

The grammatical form.

.google.cloud.language.v1beta2.PartOfSpeech.Form form = 4;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearGender()

publicPartOfSpeech.BuilderclearGender()

The grammatical gender.

.google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearMood()

publicPartOfSpeech.BuilderclearMood()

The grammatical mood.

.google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearNumber()

publicPartOfSpeech.BuilderclearNumber()

The grammatical number.

.google.cloud.language.v1beta2.PartOfSpeech.Number number = 7;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicPartOfSpeech.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
PartOfSpeech.Builder
Overrides

clearPerson()

publicPartOfSpeech.BuilderclearPerson()

The grammatical person.

.google.cloud.language.v1beta2.PartOfSpeech.Person person = 8;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearProper()

publicPartOfSpeech.BuilderclearProper()

The grammatical properness.

.google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearReciprocity()

publicPartOfSpeech.BuilderclearReciprocity()

The grammatical reciprocity.

.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearTag()

publicPartOfSpeech.BuilderclearTag()

The part of speech tag.

.google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearTense()

publicPartOfSpeech.BuilderclearTense()

The grammatical tense.

.google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearVoice()

publicPartOfSpeech.BuilderclearVoice()

The grammatical voice.

.google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12;

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clone()

publicPartOfSpeech.Builderclone()
Returns
Type Description
PartOfSpeech.Builder
Overrides

getAspect()

publicPartOfSpeech.AspectgetAspect()

The grammatical aspect.

.google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2;

Returns
Type Description
PartOfSpeech.Aspect

The aspect.

getAspectValue()

publicintgetAspectValue()

The grammatical aspect.

.google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2;

Returns
Type Description
int

The enum numeric value on the wire for aspect.

getCase()

publicPartOfSpeech.CasegetCase()

The grammatical case.

.google.cloud.language.v1beta2.PartOfSpeech.Case case = 3;

Returns
Type Description
PartOfSpeech.Case

The case.

getCaseValue()

publicintgetCaseValue()

The grammatical case.

.google.cloud.language.v1beta2.PartOfSpeech.Case case = 3;

Returns
Type Description
int

The enum numeric value on the wire for case.

getDefaultInstanceForType()

publicPartOfSpeechgetDefaultInstanceForType()
Returns
Type Description
PartOfSpeech

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getForm()

publicPartOfSpeech.FormgetForm()

The grammatical form.

.google.cloud.language.v1beta2.PartOfSpeech.Form form = 4;

Returns
Type Description
PartOfSpeech.Form

The form.

getFormValue()

publicintgetFormValue()

The grammatical form.

.google.cloud.language.v1beta2.PartOfSpeech.Form form = 4;

Returns
Type Description
int

The enum numeric value on the wire for form.

getGender()

publicPartOfSpeech.GendergetGender()

The grammatical gender.

.google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5;

Returns
Type Description
PartOfSpeech.Gender

The gender.

getGenderValue()

publicintgetGenderValue()

The grammatical gender.

.google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5;

Returns
Type Description
int

The enum numeric value on the wire for gender.

getMood()

publicPartOfSpeech.MoodgetMood()

The grammatical mood.

.google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6;

Returns
Type Description
PartOfSpeech.Mood

The mood.

getMoodValue()

publicintgetMoodValue()

The grammatical mood.

.google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6;

Returns
Type Description
int

The enum numeric value on the wire for mood.

getNumber()

publicPartOfSpeech.NumbergetNumber()

The grammatical number.

.google.cloud.language.v1beta2.PartOfSpeech.Number number = 7;

Returns
Type Description
PartOfSpeech.Number

The number.

getNumberValue()

publicintgetNumberValue()

The grammatical number.

.google.cloud.language.v1beta2.PartOfSpeech.Number number = 7;

Returns
Type Description
int

The enum numeric value on the wire for number.

getPerson()

publicPartOfSpeech.PersongetPerson()

The grammatical person.

.google.cloud.language.v1beta2.PartOfSpeech.Person person = 8;

Returns
Type Description
PartOfSpeech.Person

The person.

getPersonValue()

publicintgetPersonValue()

The grammatical person.

.google.cloud.language.v1beta2.PartOfSpeech.Person person = 8;

Returns
Type Description
int

The enum numeric value on the wire for person.

getProper()

publicPartOfSpeech.PropergetProper()

The grammatical properness.

.google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9;

Returns
Type Description
PartOfSpeech.Proper

The proper.

getProperValue()

publicintgetProperValue()

The grammatical properness.

.google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9;

Returns
Type Description
int

The enum numeric value on the wire for proper.

getReciprocity()

publicPartOfSpeech.ReciprocitygetReciprocity()

The grammatical reciprocity.

.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10;

Returns
Type Description
PartOfSpeech.Reciprocity

The reciprocity.

getReciprocityValue()

publicintgetReciprocityValue()

The grammatical reciprocity.

.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10;

Returns
Type Description
int

The enum numeric value on the wire for reciprocity.

getTag()

publicPartOfSpeech.TaggetTag()

The part of speech tag.

.google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1;

Returns
Type Description
PartOfSpeech.Tag

The tag.

getTagValue()

publicintgetTagValue()

The part of speech tag.

.google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1;

Returns
Type Description
int

The enum numeric value on the wire for tag.

getTense()

publicPartOfSpeech.TensegetTense()

The grammatical tense.

.google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11;

Returns
Type Description
PartOfSpeech.Tense

The tense.

getTenseValue()

publicintgetTenseValue()

The grammatical tense.

.google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11;

Returns
Type Description
int

The enum numeric value on the wire for tense.

getVoice()

publicPartOfSpeech.VoicegetVoice()

The grammatical voice.

.google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12;

Returns
Type Description
PartOfSpeech.Voice

The voice.

getVoiceValue()

publicintgetVoiceValue()

The grammatical voice.

.google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12;

Returns
Type Description
int

The enum numeric value on the wire for voice.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PartOfSpeech other)

publicPartOfSpeech.BuildermergeFrom(PartOfSpeechother)
Parameter
Name Description
other PartOfSpeech
Returns
Type Description
PartOfSpeech.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicPartOfSpeech.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicPartOfSpeech.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
PartOfSpeech.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalPartOfSpeech.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PartOfSpeech.Builder
Overrides

setAspect(PartOfSpeech.Aspect value)

publicPartOfSpeech.BuildersetAspect(PartOfSpeech.Aspectvalue)

The grammatical aspect.

.google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2;

Parameter
Name Description
value PartOfSpeech.Aspect

The aspect to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setAspectValue(int value)

publicPartOfSpeech.BuildersetAspectValue(intvalue)

The grammatical aspect.

.google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2;

Parameter
Name Description
value int

The enum numeric value on the wire for aspect to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setCase(PartOfSpeech.Case value)

publicPartOfSpeech.BuildersetCase(PartOfSpeech.Casevalue)

The grammatical case.

.google.cloud.language.v1beta2.PartOfSpeech.Case case = 3;

Parameter
Name Description
value PartOfSpeech.Case

The case to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setCaseValue(int value)

publicPartOfSpeech.BuildersetCaseValue(intvalue)

The grammatical case.

.google.cloud.language.v1beta2.PartOfSpeech.Case case = 3;

Parameter
Name Description
value int

The enum numeric value on the wire for case to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicPartOfSpeech.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PartOfSpeech.Builder
Overrides

setForm(PartOfSpeech.Form value)

publicPartOfSpeech.BuildersetForm(PartOfSpeech.Formvalue)

The grammatical form.

.google.cloud.language.v1beta2.PartOfSpeech.Form form = 4;

Parameter
Name Description
value PartOfSpeech.Form

The form to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setFormValue(int value)

publicPartOfSpeech.BuildersetFormValue(intvalue)

The grammatical form.

.google.cloud.language.v1beta2.PartOfSpeech.Form form = 4;

Parameter
Name Description
value int

The enum numeric value on the wire for form to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setGender(PartOfSpeech.Gender value)

publicPartOfSpeech.BuildersetGender(PartOfSpeech.Gendervalue)

The grammatical gender.

.google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5;

Parameter
Name Description
value PartOfSpeech.Gender

The gender to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setGenderValue(int value)

publicPartOfSpeech.BuildersetGenderValue(intvalue)

The grammatical gender.

.google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5;

Parameter
Name Description
value int

The enum numeric value on the wire for gender to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setMood(PartOfSpeech.Mood value)

publicPartOfSpeech.BuildersetMood(PartOfSpeech.Moodvalue)

The grammatical mood.

.google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6;

Parameter
Name Description
value PartOfSpeech.Mood

The mood to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setMoodValue(int value)

publicPartOfSpeech.BuildersetMoodValue(intvalue)

The grammatical mood.

.google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6;

Parameter
Name Description
value int

The enum numeric value on the wire for mood to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setNumber(PartOfSpeech.Number value)

publicPartOfSpeech.BuildersetNumber(PartOfSpeech.Numbervalue)

The grammatical number.

.google.cloud.language.v1beta2.PartOfSpeech.Number number = 7;

Parameter
Name Description
value PartOfSpeech.Number

The number to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setNumberValue(int value)

publicPartOfSpeech.BuildersetNumberValue(intvalue)

The grammatical number.

.google.cloud.language.v1beta2.PartOfSpeech.Number number = 7;

Parameter
Name Description
value int

The enum numeric value on the wire for number to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setPerson(PartOfSpeech.Person value)

publicPartOfSpeech.BuildersetPerson(PartOfSpeech.Personvalue)

The grammatical person.

.google.cloud.language.v1beta2.PartOfSpeech.Person person = 8;

Parameter
Name Description
value PartOfSpeech.Person

The person to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setPersonValue(int value)

publicPartOfSpeech.BuildersetPersonValue(intvalue)

The grammatical person.

.google.cloud.language.v1beta2.PartOfSpeech.Person person = 8;

Parameter
Name Description
value int

The enum numeric value on the wire for person to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setProper(PartOfSpeech.Proper value)

publicPartOfSpeech.BuildersetProper(PartOfSpeech.Propervalue)

The grammatical properness.

.google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9;

Parameter
Name Description
value PartOfSpeech.Proper

The proper to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setProperValue(int value)

publicPartOfSpeech.BuildersetProperValue(intvalue)

The grammatical properness.

.google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9;

Parameter
Name Description
value int

The enum numeric value on the wire for proper to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setReciprocity(PartOfSpeech.Reciprocity value)

publicPartOfSpeech.BuildersetReciprocity(PartOfSpeech.Reciprocityvalue)

The grammatical reciprocity.

.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10;

Parameter
Name Description
value PartOfSpeech.Reciprocity

The reciprocity to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setReciprocityValue(int value)

publicPartOfSpeech.BuildersetReciprocityValue(intvalue)

The grammatical reciprocity.

.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10;

Parameter
Name Description
value int

The enum numeric value on the wire for reciprocity to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

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

publicPartOfSpeech.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
PartOfSpeech.Builder
Overrides

setTag(PartOfSpeech.Tag value)

publicPartOfSpeech.BuildersetTag(PartOfSpeech.Tagvalue)

The part of speech tag.

.google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1;

Parameter
Name Description
value PartOfSpeech.Tag

The tag to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setTagValue(int value)

publicPartOfSpeech.BuildersetTagValue(intvalue)

The part of speech tag.

.google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for tag to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setTense(PartOfSpeech.Tense value)

publicPartOfSpeech.BuildersetTense(PartOfSpeech.Tensevalue)

The grammatical tense.

.google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11;

Parameter
Name Description
value PartOfSpeech.Tense

The tense to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setTenseValue(int value)

publicPartOfSpeech.BuildersetTenseValue(intvalue)

The grammatical tense.

.google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11;

Parameter
Name Description
value int

The enum numeric value on the wire for tense to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalPartOfSpeech.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PartOfSpeech.Builder
Overrides

setVoice(PartOfSpeech.Voice value)

publicPartOfSpeech.BuildersetVoice(PartOfSpeech.Voicevalue)

The grammatical voice.

.google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12;

Parameter
Name Description
value PartOfSpeech.Voice

The voice to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

setVoiceValue(int value)

publicPartOfSpeech.BuildersetVoiceValue(intvalue)

The grammatical voice.

.google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12;

Parameter
Name Description
value int

The enum numeric value on the wire for voice to set.

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

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年10月30日 UTC.