class_docstr: Interface to the CoreNLP Parser.
docstr: Tag a list of tokens.
  
  :rtype: list(tuple(str, str))
  
  Skip these tests if CoreNLP is likely not ready.
  >>> from nltk.test.setup_fixt import check_jar
  >>> check_jar(CoreNLPServer._JAR, env_vars=("CORENLP",), is_regex=True)
  
  The CoreNLP server can be started using the following notation, although
  we recommend the `with CoreNLPServer() as server:` context manager notation
  to ensure that the server is always stopped.
  >>> server = CoreNLPServer()
  >>> server.start()
  >>> parser = CoreNLPParser(url=server.url, tagtype='ner')
  >>> tokens = 'Rami Eid is studying at Stony Brook University in NY'.split()
  >>> parser.tag(tokens)  # doctest: +NORMALIZE_WHITESPACE
  [('Rami', 'PERSON'), ('Eid', 'PERSON'), ('is', 'O'), ('studying', 'O'), ('at', 'O'), ('Stony', 'ORGANIZATION'),
  ('Brook', 'ORGANIZATION'), ('University', 'ORGANIZATION'), ('in', 'O'), ('NY', 'STATE_OR_PROVINCE')]
  
  >>> parser = CoreNLPParser(url=server.url, tagtype='pos')
  >>> tokens = "What is the airspeed of an unladen swallow ?".split()
  >>> parser.tag(tokens)  # doctest: +NORMALIZE_WHITESPACE
  [('What', 'WP'), ('is', 'VBZ'), ('the', 'DT'),
  ('airspeed', 'NN'), ('of', 'IN'), ('an', 'DT'),
  ('unladen', 'JJ'), ('swallow', 'VB'), ('?', '.')]
  >>> server.stop()
docstr_tok: ["Tag","a","list","of","tokens",".",":","rtype",":","list","(","tuple","(","str",",","str",")",")","Skip","these","tests","if","CoreNLP","is","likely","not","ready",".",">",">",">","from","nltk.test.setup_fixt","import","check_jar",">",">",">","check_jar","(","CoreNLPServer._JAR",",","env_vars=","(","``","CORENLP","''",",",")",",","is_regex=True",")","The","CoreNLP","server","can","be","started","using","the","following","notation",",","although","we","recommend","the","`","with","CoreNLPServer","(",")","as","server",":","`","context","manager","notation","to","ensure","that","the","server","is","always","stopped",".",">",">",">","server","=","CoreNLPServer","(",")",">",">",">","server.start","(",")",">",">",">","parser","=","CoreNLPParser","(","url=server.url",",","tagtype='ner","'",")",">",">",">","tokens","=","'Rami","Eid","is","studying","at","Stony","Brook","University","in","NY'.split","(",")",">",">",">","parser.tag","(","tokens",")","#","doctest",":","+NORMALIZE_WHITESPACE","[","(","'Rami","'",",","'PERSON","'",")",",","(","'Eid","'",",","'PERSON","'",")",",","(","'is","'",",","'","O","'",")",",","(","'studying","'",",","'","O","'",")",",","(","'at","'",",","'","O","'",")",",","(","'Stony","'",",","'ORGANIZATION","'",")",",","(","'Brook","'",",","'ORGANIZATION","'",")",",","(","'University","'",",","'ORGANIZATION","'",")",",","(","'in","'",",","'","O","'",")",",","(","'NY","'",",","'STATE_OR_PROVINCE","'",")","]",">",">",">","parser","=","CoreNLPParser","(","url=server.url",",","tagtype='pos","'",")",">",">",">","tokens","=","``","What","is","the","airspeed","of","an","unladen","swallow","?","``",".split","(",")",">",">",">","parser.tag","(","tokens",")","#","doctest",":","+NORMALIZE_WHITESPACE","[","(","'What","'",",","'WP","'",")",",","(","'is","'",",","'VBZ","'",")",",","(","'the","'",",","'DT","'",")",",","(","'airspeed","'",",","'NN","'",")",",","(","'of","'",",","'IN","'",")",",","(","'an","'",",","'DT","'",")",",","(","'unladen","'",",","'JJ","'",")",",","(","'swallow","'",",","'VB","'",")",",","(","'","?","'",",","'",".","'",")","]",">",">",">","server.stop","(",")"]
code: def tag(self, sentence: str) -> List[Tuple[str, str]]:
      """
      Tag a list of tokens.
  
      :rtype: list(tuple(str, str))
  
      Skip these tests if CoreNLP is likely not ready.
      >>> from nltk.test.setup_fixt import check_jar
      >>> check_jar(CoreNLPServer._JAR, env_vars=("CORENLP",), is_regex=True)
  
      The CoreNLP server can be started using the following notation, although
      we recommend the `with CoreNLPServer() as server:` context manager notation
      to ensure that the server is always stopped.
      >>> server = CoreNLPServer()
      >>> server.start()
      >>> parser = CoreNLPParser(url=server.url, tagtype='ner')
      >>> tokens = 'Rami Eid is studying at Stony Brook University in NY'.split()
      >>> parser.tag(tokens)  # doctest: +NORMALIZE_WHITESPACE
      [('Rami', 'PERSON'), ('Eid', 'PERSON'), ('is', 'O'), ('studying', 'O'), ('at', 'O'), ('Stony', 'ORGANIZATION'),
      ('Brook', 'ORGANIZATION'), ('University', 'ORGANIZATION'), ('in', 'O'), ('NY', 'STATE_OR_PROVINCE')]
  
      >>> parser = CoreNLPParser(url=server.url, tagtype='pos')
      >>> tokens = "What is the airspeed of an unladen swallow ?".split()
      >>> parser.tag(tokens)  # doctest: +NORMALIZE_WHITESPACE
      [('What', 'WP'), ('is', 'VBZ'), ('the', 'DT'),
      ('airspeed', 'NN'), ('of', 'IN'), ('an', 'DT'),
      ('unladen', 'JJ'), ('swallow', 'VB'), ('?', '.')]
      >>> server.stop()
      """
      return self.tag_sents([sentence])[0]
  
imports: import json
  import os
  import re
  import socket
  import time
  from typing import List, Tuple
  from nltk.internals import _java_options, config_java, find_jar_iter, java
  from nltk.parse.api import ParserI
  from nltk.parse.dependencygraph import DependencyGraph
  from nltk.tag.api import TaggerI
  from nltk.tokenize.api import TokenizerI
  from nltk.tree import Tree
label_desc: Use image node_id 9 for calling the GenericCoreNLPParser obj's underlying member method code with example usage: obj.tag(sentence) and returns: self