Cloud Natural Language V1beta2 Client - Class DependencyEdge (0.28.5)

Reference documentation and code samples for the Cloud Natural Language V1beta2 Client class DependencyEdge.

Represents dependency parse tree information for a token.

Generated from protobuf message google.cloud.language.v1beta2.DependencyEdge

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ head_token_index int

Represents the head of this token in the dependency tree. This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the head_token_index is its own index.

↳ label int

The parse label for the token.

getHeadTokenIndex

Represents the head of this token in the dependency tree.

This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the head_token_index is its own index.

Returns
TypeDescription
int

setHeadTokenIndex

Represents the head of this token in the dependency tree.

This is the index of the token which has an arc going to this token. The index is the position of the token in the array of tokens returned by the API method. If this token is a root token, then the head_token_index is its own index.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getLabel

The parse label for the token.

Returns
TypeDescription
int

setLabel

The parse label for the token.

Parameter
NameDescription
var int
Returns
TypeDescription
$this