class_docstr: Labeled parser that finds a grammatical relation between two words in a
  sentence. Its input is either a CoNLL2009 or ConllU dataset.
  
  For instantiated/pretrained models, see
  :class:`.TypedDependencyParserModel`.
  
  Dependency parsers provide information about word relationship. For example,
  dependency parsing can tell you what the subjects and objects of a verb are,
  as well as which words are modifying (describing) the subject. This can help
  you find precise answers to specific questions.
  
  The parser requires the dependant tokens beforehand with e.g.
  DependencyParser. The required training data can be set in two different
  ways (only one can be chosen for a particular model):
  
  - Dataset in the `CoNLL 2009 format
    <https://ufal.mff.cuni.cz/conll2009-st/trial-data.html>`__ set with
    :meth:`.setConll2009`
  - Dataset in the `CoNLL-U format
    <https://universaldependencies.org/format.html>`__ set with
    :meth:`.setConllU`
  
  Apart from that, no additional training data is needed.
  
  ========================== ======================
  Input Annotation types     Output Annotation type
  ========================== ======================
  ``TOKEN, POS, DEPENDENCY`` ``LABELED_DEPENDENCY``
  ========================== ======================
  
  Parameters
  ----------
  conll2009
      Path to file with CoNLL 2009 format
  conllU
      Universal Dependencies source files
  numberOfIterations
      Number of iterations in training, converges to better accuracy
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> sentence = SentenceDetector() \
  ...     .setInputCols(["document"]) \
  ...     .setOutputCol("sentence")
  >>> tokenizer = Tokenizer() \
  ...     .setInputCols(["sentence"]) \
  ...     .setOutputCol("token")
  >>> posTagger = PerceptronModel.pretrained() \
  ...     .setInputCols(["sentence", "token"]) \
  ...     .setOutputCol("pos")
  >>> dependencyParser = DependencyParserModel.pretrained() \
  ...     .setInputCols(["sentence", "pos", "token"]) \
  ...     .setOutputCol("dependency")
  >>> typedDependencyParser = TypedDependencyParserApproach() \
  ...     .setInputCols(["dependency", "pos", "token"]) \
  ...     .setOutputCol("dependency_type") \
  ...     .setConllU("src/test/resources/parser/labeled/train_small.conllu.txt") \
  ...     .setNumberOfIterations(1)
  >>> pipeline = Pipeline().setStages([
  ...     documentAssembler,
  ...     sentence,
  ...     tokenizer,
  ...     posTagger,
  ...     dependencyParser,
  ...     typedDependencyParser
  ... ])
  
  Additional training data is not needed, the dependency parser relies on
  CoNLL-U only.
  
  >>> emptyDataSet = spark.createDataFrame([[""]]).toDF("text")
  >>> pipelineModel = pipeline.fit(emptyDataSet)
docstr: Sets path to Universal Dependencies source files.
  
  Parameters
  ----------
  path : str
      Path to the resource
  read_as : str, optional
      How to read the resource, by default ReadAs.TEXT
  options : dict, optional
      Options for reading the resource, by default {"key": "value"}
code: def setConllU(
      self, path, read_as=ReadAs.TEXT, options={"key": "value"}
  ):
      """Sets path to Universal Dependencies source files.
  
      Parameters
      ----------
      path : str
          Path to the resource
      read_as : str, optional
          How to read the resource, by default ReadAs.TEXT
      options : dict, optional
          Options for reading the resource, by default {"key": "value"}
      """
      opts = options.copy()
      return self._set(conllU=ExternalResource(path, read_as, opts))
  
file_path: spark-nlp/python/sparknlp/annotator/dependency/typed_dependency_parser.py
imports: from sparknlp.common import *
label_desc: Use image node_id 3 for calling the TypedDependencyParserApproach obj's underlying member method code with example usage: obj.setConllU(path, read_as, options) and returns: self