analyzeSyntax() public method

public analyzeSyntax ( array $args = [] ) : array
$args array
return array
 /**
  * Analyzes the document and provides a full set of text annotations.
  *
  * Example:
  * ```
  * $annotation = $language->analyzeSyntax('Google Cloud Platform is a powerful tool.');
  *
  * foreach ($annotation->sentences() as $sentence) {
  *     echo $sentence['text']['beginOffset'];
  * }
  * ```
  *
  * @codingStandardsIgnoreStart
  * @see https://cloud.google.com/natural-language/reference/rest/v1beta1/documents/analyzeSyntax Analyze Syntax API documentation
  * @codingStandardsIgnoreEnd
  *
  * @param string|StorageObject $content The content to analyze.
  * @param array $options [optional] {
  *     Configuration options.
  *
  *     @type string $type The document type. Acceptable values are
  *           `PLAIN_TEXT` or `HTML`. **Defaults to** `"PLAIN_TEXT"`.
  *     @type string $language The language of the document. Both ISO
  *           (e.g., en, es) and BCP-47 (e.g., en-US, es-ES) language codes
  *           are accepted. If no value is provided, the language will be
  *           detected by the service.
  *     @type string $encodingType The text encoding type used by the API to
  *           calculate offsets. Acceptable values are `"NONE"`, `"UTF8"`,
  *           `"UTF16"` and `"UTF32"`. **Defaults to**  `"UTF8"`.
  * }
  * @return Annotation
  */
 public function analyzeSyntax($content, array $options = [])
 {
     $syntaxResponse = $this->connection->analyzeSyntax($this->formatRequest($content, $options));
     return new Annotation($syntaxResponse + ['entities' => []]);
 }