class Token extends Message

Represents the smallest syntactic building block of the text.

Protobuf type Google\Cloud\Language\V1beta2\Token

Methods

__construct()

No description

getText()

The token text.

setText(TextSpan $var)

The token text.

getPartOfSpeech()

Parts of speech tag for this token.

setPartOfSpeech(PartOfSpeech $var)

Parts of speech tag for this token.

getDependencyEdge()

Dependency tree parse for this token.

setDependencyEdge(DependencyEdge $var)

Dependency tree parse for this token.

string
getLemma()

Lemma of the token.

setLemma(string $var)

Lemma of the token.

Details

at line 43
__construct()

at line 54
TextSpan getText()

The token text.

Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1;

Return Value

TextSpan

at line 65
setText(TextSpan $var)

The token text.

Generated from protobuf field .google.cloud.language.v1beta2.TextSpan text = 1;

Parameters

TextSpan $var

at line 77
PartOfSpeech getPartOfSpeech()

Parts of speech tag for this token.

Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2;

Return Value

PartOfSpeech

at line 88
setPartOfSpeech(PartOfSpeech $var)

Parts of speech tag for this token.

Generated from protobuf field .google.cloud.language.v1beta2.PartOfSpeech part_of_speech = 2;

Parameters

PartOfSpeech $var

at line 100
DependencyEdge getDependencyEdge()

Dependency tree parse for this token.

Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3;

Return Value

DependencyEdge

at line 111
setDependencyEdge(DependencyEdge $var)

Dependency tree parse for this token.

Generated from protobuf field .google.cloud.language.v1beta2.DependencyEdge dependency_edge = 3;

Parameters

DependencyEdge $var

at line 123
string getLemma()

Lemma of the token.

Generated from protobuf field string lemma = 4;

Return Value

string

at line 134
setLemma(string $var)

Lemma of the token.

Generated from protobuf field string lemma = 4;

Parameters

string $var