Generated from protobuf message google.cloud.language.v1.DependencyEdge
Namespace
Google \ Cloud \ Language \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
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
Type
Description
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Cloud Natural Language V1 Client - Class DependencyEdge (1.0.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.1 (latest)](/php/docs/reference/cloud-language/latest/V1.DependencyEdge)\n- [1.0.0](/php/docs/reference/cloud-language/1.0.0/V1.DependencyEdge)\n- [0.34.3](/php/docs/reference/cloud-language/0.34.3/V1.DependencyEdge)\n- [0.33.0](/php/docs/reference/cloud-language/0.33.0/V1.DependencyEdge)\n- [0.32.7](/php/docs/reference/cloud-language/0.32.7/V1.DependencyEdge)\n- [0.31.3](/php/docs/reference/cloud-language/0.31.3/V1.DependencyEdge)\n- [0.30.2](/php/docs/reference/cloud-language/0.30.2/V1.DependencyEdge)\n- [0.29.0](/php/docs/reference/cloud-language/0.29.0/V1.DependencyEdge)\n- [0.28.5](/php/docs/reference/cloud-language/0.28.5/V1.DependencyEdge) \nReference documentation and code samples for the Cloud Natural Language V1 Client class DependencyEdge.\n\nRepresents dependency parse tree information for a token. (For more\ninformation on dependency labels, see\n\u003chttp://www.aclweb.org/anthology/P13-2017\u003e\n\nGenerated from protobuf message `google.cloud.language.v1.DependencyEdge`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Language \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getHeadTokenIndex\n\nRepresents the head of this token in the dependency tree.\n\nThis is the index of the token which has an arc going to this token.\nThe index is the position of the token in the array of tokens returned\nby the API method. If this token is a root token, then the\n`head_token_index` is its own index.\n\n### setHeadTokenIndex\n\nRepresents the head of this token in the dependency tree.\n\nThis is the index of the token which has an arc going to this token.\nThe index is the position of the token in the array of tokens returned\nby the API method. If this token is a root token, then the\n`head_token_index` is its own index.\n\n### getLabel\n\nThe parse label for the token.\n\n### setLabel\n\nThe parse label for the token."]]