class Sentiment extends Message

Represents the feeling associated with the entire text or entities in the text.

Protobuf type Google\Cloud\Language\V1beta2\Sentiment

Methods

__construct()

No description

float
getMagnitude()

A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).

setMagnitude(float $var)

A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).

float
getScore()

Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).

setScore(float $var)

Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).

Details

at line 35
__construct()

at line 48
float getMagnitude()

A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).

Generated from protobuf field float magnitude = 2;

Return Value

float

at line 61
setMagnitude(float $var)

A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment regardless of score (positive or negative).

Generated from protobuf field float magnitude = 2;

Parameters

float $var

at line 74
float getScore()

Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).

Generated from protobuf field float score = 3;

Return Value

float

at line 86
setScore(float $var)

Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).

Generated from protobuf field float score = 3;

Parameters

float $var