Class PartOfSpeech (2.18.0)

publicfinalclass PartOfSpeechextendsGeneratedMessageV3implementsPartOfSpeechOrBuilder

Represents part of speech information for a token.

Protobuf type google.cloud.language.v1beta2.PartOfSpeech

Inherited Members

Static Fields

ASPECT_FIELD_NUMBER

publicstaticfinalintASPECT_FIELD_NUMBER
Field Value
Type Description
int

CASE_FIELD_NUMBER

publicstaticfinalintCASE_FIELD_NUMBER
Field Value
Type Description
int

FORM_FIELD_NUMBER

publicstaticfinalintFORM_FIELD_NUMBER
Field Value
Type Description
int

GENDER_FIELD_NUMBER

publicstaticfinalintGENDER_FIELD_NUMBER
Field Value
Type Description
int

MOOD_FIELD_NUMBER

publicstaticfinalintMOOD_FIELD_NUMBER
Field Value
Type Description
int

NUMBER_FIELD_NUMBER

publicstaticfinalintNUMBER_FIELD_NUMBER
Field Value
Type Description
int

PERSON_FIELD_NUMBER

publicstaticfinalintPERSON_FIELD_NUMBER
Field Value
Type Description
int

PROPER_FIELD_NUMBER

publicstaticfinalintPROPER_FIELD_NUMBER
Field Value
Type Description
int

RECIPROCITY_FIELD_NUMBER

publicstaticfinalintRECIPROCITY_FIELD_NUMBER
Field Value
Type Description
int

TAG_FIELD_NUMBER

publicstaticfinalintTAG_FIELD_NUMBER
Field Value
Type Description
int

TENSE_FIELD_NUMBER

publicstaticfinalintTENSE_FIELD_NUMBER
Field Value
Type Description
int

VOICE_FIELD_NUMBER

publicstaticfinalintVOICE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticPartOfSpeechgetDefaultInstance()
Returns
Type Description
PartOfSpeech

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticPartOfSpeech.BuildernewBuilder()
Returns
Type Description
PartOfSpeech.Builder

newBuilder(PartOfSpeech prototype)

publicstaticPartOfSpeech.BuildernewBuilder(PartOfSpeechprototype)
Parameter
Name Description
prototype PartOfSpeech
Returns
Type Description
PartOfSpeech.Builder

parseDelimitedFrom(InputStream input)

publicstaticPartOfSpeechparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPartOfSpeechparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticPartOfSpeechparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticPartOfSpeechparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticPartOfSpeechparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticPartOfSpeechparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticPartOfSpeechparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPartOfSpeechparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticPartOfSpeechparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPartOfSpeechparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticPartOfSpeechparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticPartOfSpeechparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<PartOfSpeech>parser()
Returns
Type Description
Parser<PartOfSpeech>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

getParserForType()

publicParser<PartOfSpeech>getParserForType()
Returns
Type Description
Parser<PartOfSpeech>
Overrides

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.

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

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.

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicPartOfSpeech.BuildernewBuilderForType()
Returns
Type Description
PartOfSpeech.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedPartOfSpeech.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PartOfSpeech.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicPartOfSpeech.BuildertoBuilder()
Returns
Type Description
PartOfSpeech.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.