Google\Cloud\NaturalLanguage\Annotation::sentiment PHP Метод

sentiment() публичный Метод

Example: $sentiment = $annotation->sentiment(); if ($sentiment['score'] > 0) { echo 'This is a positive message.'; }
См. также: https://cloud.google.com/natural-language/reference/rest/v1beta1/Sentiment Sentiment type documentation
public sentiment ( ) : array | null
Результат array | null
    public function sentiment()
    {
        return isset($this->info['documentSentiment']) ? $this->info['documentSentiment'] : null;
    }