Class PartOfSpeech (2.46.0)

public final class PartOfSpeech extends GeneratedMessageV3 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 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

FORM_FIELD_NUMBER

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()
Returns
Type Description
PartOfSpeech

getDescriptor()

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

newBuilder()

public static PartOfSpeech.Builder newBuilder()
Returns
Type Description
PartOfSpeech.Builder

newBuilder(PartOfSpeech prototype)

public static PartOfSpeech.Builder newBuilder(PartOfSpeech prototype)
Parameter
Name Description
prototype PartOfSpeech
Returns
Type Description
PartOfSpeech.Builder

parseDelimitedFrom(InputStream input)

public static PartOfSpeech parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static PartOfSpeech parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PartOfSpeech parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PartOfSpeech parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static PartOfSpeech parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static PartOfSpeech parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartOfSpeech
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<PartOfSpeech> parser()
Returns
Type Description
Parser<PartOfSpeech>

Methods

equals(Object obj)

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

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.

getParserForType()

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

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public PartOfSpeech.Builder newBuilderForType()
Returns
Type Description
PartOfSpeech.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PartOfSpeech.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PartOfSpeech.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public PartOfSpeech.Builder toBuilder()
Returns
Type Description
PartOfSpeech.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException