Class protos.google.cloud.language.v1beta2.PartOfSpeech (5.2.1)

Represents a PartOfSpeech.

Package

@google-cloud/language

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.language.v1beta2.IPartOfSpeech);

Constructs a new PartOfSpeech.

Parameter
NameDescription
properties IPartOfSpeech

Properties to set

Properties

aspect

public aspect: (google.cloud.language.v1beta2.PartOfSpeech.Aspect|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Aspect);

PartOfSpeech aspect.

case

public case: (google.cloud.language.v1beta2.PartOfSpeech.Case|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Case);

PartOfSpeech case.

form

public form: (google.cloud.language.v1beta2.PartOfSpeech.Form|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Form);

PartOfSpeech form.

gender

public gender: (google.cloud.language.v1beta2.PartOfSpeech.Gender|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Gender);

PartOfSpeech gender.

mood

public mood: (google.cloud.language.v1beta2.PartOfSpeech.Mood|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Mood);

PartOfSpeech mood.

number

public number: (google.cloud.language.v1beta2.PartOfSpeech.Number|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Number);

PartOfSpeech number.

person

public person: (google.cloud.language.v1beta2.PartOfSpeech.Person|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Person);

PartOfSpeech person.

proper

public proper: (google.cloud.language.v1beta2.PartOfSpeech.Proper|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Proper);

PartOfSpeech proper.

reciprocity

public reciprocity: (google.cloud.language.v1beta2.PartOfSpeech.Reciprocity|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Reciprocity);

PartOfSpeech reciprocity.

tag

public tag: (google.cloud.language.v1beta2.PartOfSpeech.Tag|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Tag);

PartOfSpeech tag.

tense

public tense: (google.cloud.language.v1beta2.PartOfSpeech.Tense|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Tense);

PartOfSpeech tense.

voice

public voice: (google.cloud.language.v1beta2.PartOfSpeech.Voice|keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Voice);

PartOfSpeech voice.

Methods

create(properties)

public static create(properties?: google.cloud.language.v1beta2.IPartOfSpeech): google.cloud.language.v1beta2.PartOfSpeech;

Creates a new PartOfSpeech instance using the specified properties.

Parameter
NameDescription
properties IPartOfSpeech

Properties to set

Returns
TypeDescription
google.cloud.language.v1beta2.PartOfSpeech

PartOfSpeech instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.language.v1beta2.PartOfSpeech;

Decodes a PartOfSpeech message from the specified reader or buffer.

Parameters
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
google.cloud.language.v1beta2.PartOfSpeech

PartOfSpeech

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.language.v1beta2.PartOfSpeech;

Decodes a PartOfSpeech message from the specified reader or buffer, length delimited.

Parameter
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
google.cloud.language.v1beta2.PartOfSpeech

PartOfSpeech

encode(message, writer)

public static encode(message: google.cloud.language.v1beta2.IPartOfSpeech, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified PartOfSpeech message. Does not implicitly messages.

Parameters
NameDescription
message IPartOfSpeech

PartOfSpeech message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

encodeDelimited(message, writer)

public static encodeDelimited(message: google.cloud.language.v1beta2.IPartOfSpeech, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified PartOfSpeech message, length delimited. Does not implicitly messages.

Parameters
NameDescription
message IPartOfSpeech

PartOfSpeech message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

fromObject(object)

public static fromObject(object: { [k: string]: any }): google.cloud.language.v1beta2.PartOfSpeech;

Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types.

Parameter
NameDescription
object { [k: string]: any }

Plain object

Returns
TypeDescription
google.cloud.language.v1beta2.PartOfSpeech

PartOfSpeech

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for PartOfSpeech

Parameter
NameDescription
typeUrlPrefix string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
TypeDescription
string

The default type url

toJSON()

public toJSON(): { [k: string]: any };

Converts this PartOfSpeech to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.language.v1beta2.PartOfSpeech, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified.

Parameters
NameDescription
message google.cloud.language.v1beta2.PartOfSpeech

PartOfSpeech

options $protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies a PartOfSpeech message.

Parameter
NameDescription
message { [k: string]: any }

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not