Google\Cloud\NaturalLanguage\Annotation::tokensByLabel PHP Method

tokensByLabel() public method

Example: $tokens = $annotation->tokensByLabel('P'); foreach ($tokens as $token) { echo $token['lemma']; }
See also: https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/annotateText#label Token labels documentation
public tokensByLabel ( $label ) : array | null
return array | null
    public function tokensByLabel($label)
    {
        return $this->filter($this->tokens(), ['dependencyEdge', 'label'], $label);
    }