Class PartOfSpeech.Builder (2.1.10)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PartOfSpeech.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PartOfSpeech.Builder
Overrides

build()

public PartOfSpeech build()
Returns
TypeDescription
PartOfSpeech

buildPartial()

public PartOfSpeech buildPartial()
Returns
TypeDescription
PartOfSpeech

clear()

public PartOfSpeech.Builder clear()
Returns
TypeDescription
PartOfSpeech.Builder
Overrides

clearAspect()

public PartOfSpeech.Builder clearAspect()

The grammatical aspect.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearCase()

public PartOfSpeech.Builder clearCase()

The grammatical case.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public PartOfSpeech.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PartOfSpeech.Builder
Overrides

clearForm()

public PartOfSpeech.Builder clearForm()

The grammatical form.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearGender()

public PartOfSpeech.Builder clearGender()

The grammatical gender.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearMood()

public PartOfSpeech.Builder clearMood()

The grammatical mood.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearNumber()

public PartOfSpeech.Builder clearNumber()

The grammatical number.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PartOfSpeech.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PartOfSpeech.Builder
Overrides

clearPerson()

public PartOfSpeech.Builder clearPerson()

The grammatical person.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearProper()

public PartOfSpeech.Builder clearProper()

The grammatical properness.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearReciprocity()

public PartOfSpeech.Builder clearReciprocity()

The grammatical reciprocity.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearTense()

public PartOfSpeech.Builder clearTense()

The grammatical tense.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clearVoice()

public PartOfSpeech.Builder clearVoice()

The grammatical voice.

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

clone()

public PartOfSpeech.Builder clone()
Returns
TypeDescription
PartOfSpeech.Builder
Overrides

getAspect()

public PartOfSpeech.Aspect getAspect()

The grammatical aspect.

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

Returns
TypeDescription
PartOfSpeech.Aspect

The aspect.

getAspectValue()

public int getAspectValue()

The grammatical aspect.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Case

The case.

getCaseValue()

public int getCaseValue()

The grammatical case.

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

Returns
TypeDescription
int

The enum numeric value on the wire for case.

getDefaultInstanceForType()

public PartOfSpeech getDefaultInstanceForType()
Returns
TypeDescription
PartOfSpeech

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getForm()

public PartOfSpeech.Form getForm()

The grammatical form.

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

Returns
TypeDescription
PartOfSpeech.Form

The form.

getFormValue()

public int getFormValue()

The grammatical form.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Gender

The gender.

getGenderValue()

public int getGenderValue()

The grammatical gender.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Mood

The mood.

getMoodValue()

public int getMoodValue()

The grammatical mood.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Number

The number.

getNumberValue()

public int getNumberValue()

The grammatical number.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Person

The person.

getPersonValue()

public int getPersonValue()

The grammatical person.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Proper

The proper.

getProperValue()

public int getProperValue()

The grammatical properness.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Reciprocity

The reciprocity.

getReciprocityValue()

public int getReciprocityValue()

The grammatical reciprocity.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Tag

The tag.

getTagValue()

public int getTagValue()

The part of speech tag.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Tense

The tense.

getTenseValue()

public int getTenseValue()

The grammatical tense.

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

Returns
TypeDescription
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
TypeDescription
PartOfSpeech.Voice

The voice.

getVoiceValue()

public int getVoiceValue()

The grammatical voice.

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

Returns
TypeDescription
int

The enum numeric value on the wire for voice.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PartOfSpeech other)

public PartOfSpeech.Builder mergeFrom(PartOfSpeech other)
Parameter
NameDescription
otherPartOfSpeech
Returns
TypeDescription
PartOfSpeech.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PartOfSpeech.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PartOfSpeech.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PartOfSpeech.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
PartOfSpeech.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PartOfSpeech.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Aspect

The aspect to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Case

The case to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public PartOfSpeech.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Form

The form to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Gender

The gender to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Mood

The mood to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Number

The number to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Person

The person to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Proper

The proper to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Reciprocity

The reciprocity to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Tag

The tag to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Tense

The tense to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final PartOfSpeech.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuePartOfSpeech.Voice

The voice to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
PartOfSpeech.Builder

This builder for chaining.