Class PartOfSpeech (2.28.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
TypeDescription
int

CASE_FIELD_NUMBER

public static final int CASE_FIELD_NUMBER
Field Value
TypeDescription
int

FORM_FIELD_NUMBER

public static final int FORM_FIELD_NUMBER
Field Value
TypeDescription
int

GENDER_FIELD_NUMBER

public static final int GENDER_FIELD_NUMBER
Field Value
TypeDescription
int

MOOD_FIELD_NUMBER

public static final int MOOD_FIELD_NUMBER
Field Value
TypeDescription
int

NUMBER_FIELD_NUMBER

public static final int NUMBER_FIELD_NUMBER
Field Value
TypeDescription
int

PERSON_FIELD_NUMBER

public static final int PERSON_FIELD_NUMBER
Field Value
TypeDescription
int

PROPER_FIELD_NUMBER

public static final int PROPER_FIELD_NUMBER
Field Value
TypeDescription
int

RECIPROCITY_FIELD_NUMBER

public static final int RECIPROCITY_FIELD_NUMBER
Field Value
TypeDescription
int

TAG_FIELD_NUMBER

public static final int TAG_FIELD_NUMBER
Field Value
TypeDescription
int

TENSE_FIELD_NUMBER

public static final int TENSE_FIELD_NUMBER
Field Value
TypeDescription
int

VOICE_FIELD_NUMBER

public static final int VOICE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static PartOfSpeech getDefaultInstance()
Returns
TypeDescription
PartOfSpeech

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static PartOfSpeech.Builder newBuilder()
Returns
TypeDescription
PartOfSpeech.Builder

newBuilder(PartOfSpeech prototype)

public static PartOfSpeech.Builder newBuilder(PartOfSpeech prototype)
Parameter
NameDescription
prototypePartOfSpeech
Returns
TypeDescription
PartOfSpeech.Builder

parseDelimitedFrom(InputStream input)

public static PartOfSpeech parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static PartOfSpeech parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PartOfSpeech parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PartOfSpeech parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static PartOfSpeech parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static PartOfSpeech parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PartOfSpeech parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PartOfSpeech
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<PartOfSpeech> parser()
Returns
TypeDescription
Parser<PartOfSpeech>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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.

getParserForType()

public Parser<PartOfSpeech> getParserForType()
Returns
TypeDescription
Parser<PartOfSpeech>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public PartOfSpeech.Builder newBuilderForType()
Returns
TypeDescription
PartOfSpeech.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PartOfSpeech.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
PartOfSpeech.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public PartOfSpeech.Builder toBuilder()
Returns
TypeDescription
PartOfSpeech.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException