@_memorize<EOL><INDENT>def _get_annotations(self, text, language='<STR_LIT>'):<DEDENT>
body = {<EOL>'<STR_LIT>': {<EOL>'<STR_LIT:type>': '<STR_LIT>',<EOL>'<STR_LIT:content>': text,<EOL>},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': True,<EOL>},<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>if language:<EOL><INDENT>body['<STR_LIT>']['<STR_LIT>'] = language<EOL><DEDENT>request = self.service.documents().annotateText(body=body)<EOL>response = request.execute()<EOL>tokens = response.get('<STR_LIT>', [])<EOL>language = response.get('<STR_LIT>')<EOL>return {'<STR_LIT>': tokens, '<STR_LIT>': language}<EOL>
Returns the list of annotations retrieved from the given text.

        Args:
          text (str): Input text.
          language (:obj:`str`, optional): Language code.

        Returns:
          Results in a dictionary. :code:`tokens` contains the list of annotations
          and :code:`language` contains the inferred language from the input.