Class PartOfSpeech.Builder (2.56.0)

public static final class PartOfSpeech.Builder extends GeneratedMessageV3.Builder<PartOfSpeech.Builder> implements PartOfSpeechOrBuilder

Represents part of speech information for a token. Parts of speech are as defined in http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf

Protobuf type google.cloud.language.v1.PartOfSpeech

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PartOfSpeech build()
Returns
Type Description
PartOfSpeech

buildPartial()

public PartOfSpeech buildPartial()
Returns
Type Description
PartOfSpeech

clear()

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

clearAspect()

public PartOfSpeech.Builder clearAspect()

The grammatical aspect.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearCase()

public PartOfSpeech.Builder clearCase()

The grammatical case.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearForm()

public PartOfSpeech.Builder clearForm()

The grammatical form.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearGender()

public PartOfSpeech.Builder clearGender()

The grammatical gender.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearMood()

public PartOfSpeech.Builder clearMood()

The grammatical mood.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearNumber()

public PartOfSpeech.Builder clearNumber()

The grammatical number.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PartOfSpeech.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
PartOfSpeech.Builder
Overrides

clearPerson()

public PartOfSpeech.Builder clearPerson()

The grammatical person.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearProper()

public PartOfSpeech.Builder clearProper()

The grammatical properness.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearReciprocity()

public PartOfSpeech.Builder clearReciprocity()

The grammatical reciprocity.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearTag()

public PartOfSpeech.Builder clearTag()

The part of speech tag.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearTense()

public PartOfSpeech.Builder clearTense()

The grammatical tense.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clearVoice()

public PartOfSpeech.Builder clearVoice()

The grammatical voice.

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

Returns
Type Description
PartOfSpeech.Builder

This builder for chaining.

clone()

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

getAspect()

public PartOfSpeech.Aspect getAspect()

The grammatical aspect.

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

Returns
Type Description
PartOfSpeech.Aspect

The aspect.

getAspectValue()

public int getAspectValue()

The grammatical aspect.

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

Returns
Type Description
int

The enum numeric value on the wire for aspect.

getCase()

public PartOfSpeech.Case getCase()

The grammatical case.

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

Returns
Type Description
PartOfSpeech.Case

The case.

getCaseValue()

public int getCaseValue()

The grammatical case.

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

Returns
Type Description
int

The enum numeric value on the wire for case.

getDefaultInstanceForType()

public PartOfSpeech getDefaultInstanceForType()
Returns
Type Description
PartOfSpeech

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getForm()

public PartOfSpeech.Form getForm()

The grammatical form.

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

Returns
Type Description
PartOfSpeech.Form

The form.

getFormValue()

public int getFormValue()

The grammatical form.

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

Returns
Type Description
int

The enum numeric value on the wire for form.

getGender()

public PartOfSpeech.Gender getGender()

The grammatical gender.

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

Returns
Type Description
PartOfSpeech.Gender

The gender.

getGenderValue()

public int getGenderValue()

The grammatical gender.

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

Returns
Type Description
int

The enum numeric value on the wire for gender.

getMood()

public PartOfSpeech.Mood getMood()

The grammatical mood.

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

Returns
Type Description
PartOfSpeech.Mood

The mood.

getMoodValue()

public int getMoodValue()

The grammatical mood.

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

Returns
Type Description
int

The enum numeric value on the wire for mood.

getNumber()

public PartOfSpeech.Number getNumber()

The grammatical number.

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

Returns
Type Description
PartOfSpeech.Number

The number.

getNumberValue()

public int getNumberValue()

The grammatical number.

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

Returns
Type Description
int

The enum numeric value on the wire for number.

getPerson()

public PartOfSpeech.Person getPerson()

The grammatical person.

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

Returns
Type Description
PartOfSpeech.Person

The person.

getPersonValue()

public int getPersonValue()

The grammatical person.

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

Returns
Type Description
int

The enum numeric value on the wire for person.

getProper()

public PartOfSpeech.Proper getProper()

The grammatical properness.

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

Returns
Type Description
PartOfSpeech.Proper

The proper.

getProperValue()

public int getProperValue()

The grammatical properness.

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

Returns
Type Description
int

The enum numeric value on the wire for proper.

getReciprocity()

public PartOfSpeech.Reciprocity getReciprocity()

The grammatical reciprocity.

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

Returns
Type Description
PartOfSpeech.Reciprocity

The reciprocity.

getReciprocityValue()

public int getReciprocityValue()

The grammatical reciprocity.

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

Returns
Type Description
int

The enum numeric value on the wire for reciprocity.

getTag()

public PartOfSpeech.Tag getTag()

The part of speech tag.

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

Returns
Type Description
PartOfSpeech.Tag

The tag.

getTagValue()

public int getTagValue()

The part of speech tag.

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

Returns
Type Description
int

The enum numeric value on the wire for tag.

getTense()

public PartOfSpeech.Tense getTense()

The grammatical tense.

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

Returns
Type Description
PartOfSpeech.Tense

The tense.

getTenseValue()

public int getTenseValue()

The grammatical tense.

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

Returns
Type Description
int

The enum numeric value on the wire for tense.

getVoice()

public PartOfSpeech.Voice getVoice()

The grammatical voice.

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

Returns
Type Description
PartOfSpeech.Voice

The voice.

getVoiceValue()

public int getVoiceValue()

The grammatical voice.

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

Returns
Type Description
int

The enum numeric value on the wire for voice.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PartOfSpeech other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public PartOfSpeech.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PartOfSpeech.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAspect(PartOfSpeech.Aspect value)

public PartOfSpeech.Builder setAspect(PartOfSpeech.Aspect value)

The grammatical aspect.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setAspectValue(int value)

The grammatical aspect.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setCase(PartOfSpeech.Case value)

The grammatical case.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setCaseValue(int value)

The grammatical case.

.google.cloud.language.v1.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)

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

setForm(PartOfSpeech.Form value)

public PartOfSpeech.Builder setForm(PartOfSpeech.Form value)

The grammatical form.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setFormValue(int value)

The grammatical form.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setGender(PartOfSpeech.Gender value)

The grammatical gender.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setGenderValue(int value)

The grammatical gender.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setMood(PartOfSpeech.Mood value)

The grammatical mood.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setMoodValue(int value)

The grammatical mood.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setNumber(PartOfSpeech.Number value)

The grammatical number.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setNumberValue(int value)

The grammatical number.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setPerson(PartOfSpeech.Person value)

The grammatical person.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setPersonValue(int value)

The grammatical person.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setProper(PartOfSpeech.Proper value)

The grammatical properness.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setProperValue(int value)

The grammatical properness.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setReciprocity(PartOfSpeech.Reciprocity value)

The grammatical reciprocity.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setReciprocityValue(int value)

The grammatical reciprocity.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
PartOfSpeech.Builder
Overrides

setTag(PartOfSpeech.Tag value)

public PartOfSpeech.Builder setTag(PartOfSpeech.Tag value)

The part of speech tag.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setTagValue(int value)

The part of speech tag.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setTense(PartOfSpeech.Tense value)

The grammatical tense.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setTenseValue(int value)

The grammatical tense.

.google.cloud.language.v1.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)

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

setVoice(PartOfSpeech.Voice value)

public PartOfSpeech.Builder setVoice(PartOfSpeech.Voice value)

The grammatical voice.

.google.cloud.language.v1.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)

public PartOfSpeech.Builder setVoiceValue(int value)

The grammatical voice.

.google.cloud.language.v1.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.