Send feedback
Class PartOfSpeech (2.77.0)
Stay organized with collections
Save and categorize content based on your preferences.
public final class PartOfSpeech extends GeneratedMessageV3 implements PartOfSpeechOrBuilder
Represents part of speech information for a token.
Protobuf type google.cloud.language.v1beta2.PartOfSpeech
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ASPECT_FIELD_NUMBER
public static final int ASPECT_FIELD_NUMBER
Field Value
Type
Description
int
CASE_FIELD_NUMBER
public static final int CASE_FIELD_NUMBER
Field Value
Type
Description
int
public static final int FORM_FIELD_NUMBER
Field Value
Type
Description
int
GENDER_FIELD_NUMBER
public static final int GENDER_FIELD_NUMBER
Field Value
Type
Description
int
MOOD_FIELD_NUMBER
public static final int MOOD_FIELD_NUMBER
Field Value
Type
Description
int
NUMBER_FIELD_NUMBER
public static final int NUMBER_FIELD_NUMBER
Field Value
Type
Description
int
PERSON_FIELD_NUMBER
public static final int PERSON_FIELD_NUMBER
Field Value
Type
Description
int
PROPER_FIELD_NUMBER
public static final int PROPER_FIELD_NUMBER
Field Value
Type
Description
int
RECIPROCITY_FIELD_NUMBER
public static final int RECIPROCITY_FIELD_NUMBER
Field Value
Type
Description
int
TAG_FIELD_NUMBER
public static final int TAG_FIELD_NUMBER
Field Value
Type
Description
int
TENSE_FIELD_NUMBER
public static final int TENSE_FIELD_NUMBER
Field Value
Type
Description
int
VOICE_FIELD_NUMBER
public static final int VOICE_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static PartOfSpeech getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static PartOfSpeech . Builder newBuilder ()
newBuilder(PartOfSpeech prototype)
public static PartOfSpeech . Builder newBuilder ( PartOfSpeech prototype )
public static PartOfSpeech parseDelimitedFrom ( InputStream input )
public static PartOfSpeech parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static PartOfSpeech parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static PartOfSpeech parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static PartOfSpeech parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PartOfSpeech parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static PartOfSpeech parseFrom ( CodedInputStream input )
public static PartOfSpeech parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static PartOfSpeech parseFrom ( InputStream input )
public static PartOfSpeech parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static PartOfSpeech parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static PartOfSpeech parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<PartOfSpeech> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getAspect()
public PartOfSpeech . Aspect getAspect ()
The grammatical aspect.
.google.cloud.language.v1beta2.PartOfSpeech.Aspect aspect = 2;
getAspectValue()
public int getAspectValue ()
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()
public PartOfSpeech . Case getCase ()
The grammatical case.
.google.cloud.language.v1beta2.PartOfSpeech.Case case = 3;
getCaseValue()
public int getCaseValue ()
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()
public PartOfSpeech getDefaultInstanceForType ()
public PartOfSpeech . Form getForm ()
The grammatical form.
.google.cloud.language.v1beta2.PartOfSpeech.Form form = 4;
public int getFormValue ()
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()
public PartOfSpeech . Gender getGender ()
The grammatical gender.
.google.cloud.language.v1beta2.PartOfSpeech.Gender gender = 5;
getGenderValue()
public int getGenderValue ()
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()
public PartOfSpeech . Mood getMood ()
The grammatical mood.
.google.cloud.language.v1beta2.PartOfSpeech.Mood mood = 6;
getMoodValue()
public int getMoodValue ()
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()
public PartOfSpeech . Number getNumber ()
The grammatical number.
.google.cloud.language.v1beta2.PartOfSpeech.Number number = 7;
getNumberValue()
public int getNumberValue ()
The grammatical number.
.google.cloud.language.v1beta2.PartOfSpeech.Number number = 7;
Returns
Type
Description
int
The enum numeric value on the wire for number.
getParserForType()
public Parser<PartOfSpeech> getParserForType ()
Overrides
getPerson()
public PartOfSpeech . Person getPerson ()
The grammatical person.
.google.cloud.language.v1beta2.PartOfSpeech.Person person = 8;
getPersonValue()
public int getPersonValue ()
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()
public PartOfSpeech . Proper getProper ()
The grammatical properness.
.google.cloud.language.v1beta2.PartOfSpeech.Proper proper = 9;
getProperValue()
public int getProperValue ()
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()
public PartOfSpeech . Reciprocity getReciprocity ()
The grammatical reciprocity.
.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10;
getReciprocityValue()
public int getReciprocityValue ()
The grammatical reciprocity.
.google.cloud.language.v1beta2.PartOfSpeech.Reciprocity reciprocity = 10;
Returns
Type
Description
int
The enum numeric value on the wire for reciprocity.
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
getTag()
public PartOfSpeech . Tag getTag ()
The part of speech tag.
.google.cloud.language.v1beta2.PartOfSpeech.Tag tag = 1;
getTagValue()
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()
public PartOfSpeech . Tense getTense ()
The grammatical tense.
.google.cloud.language.v1beta2.PartOfSpeech.Tense tense = 11;
getTenseValue()
public int getTenseValue ()
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()
public PartOfSpeech . Voice getVoice ()
The grammatical voice.
.google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12;
getVoiceValue()
public int getVoiceValue ()
The grammatical voice.
.google.cloud.language.v1beta2.PartOfSpeech.Voice voice = 12;
Returns
Type
Description
int
The enum numeric value on the wire for voice.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public PartOfSpeech . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected PartOfSpeech . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public PartOfSpeech . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
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-10-11 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-10-11 UTC."],[],[]]