class_docstr: CLTK's wrapper for the Stanza project.
class_docstr_tok: ["CLTK","'s","wrapper","for","the","Stanza","project","."]
docstr: Run all available ``stanza`` parsing on input text.
  
  >>> from cltk.languages.example_texts import get_example_text
  >>> stanza_wrapper = StanzaWrapper(language='grc', stanza_debug_level="INFO", interactive=False, silent=True)
  >>> greek_nlp = stanza_wrapper.parse(get_example_text("grc"))
  >>> from stanza.models.common.doc import Document, Token
  >>> isinstance(greek_nlp, Document)
  True
  
  >>> nlp_greek_first_sent = greek_nlp.sentences[0]
  >>> isinstance(nlp_greek_first_sent.tokens[0], Token)
  True
  >>> nlp_greek_first_sent.tokens[0].text
  'ὅτι'
  >>> nlp_greek_first_sent.tokens[0].words
  [{
    "id": 1,
    "text": "ὅτι",
    "lemma": "ὅτι",
    "upos": "ADV",
    "xpos": "Df",
    "head": 13,
    "deprel": "advmod",
    "start_char": 0,
    "end_char": 3
  }]
  >>> nlp_greek_first_sent.tokens[0].start_char
  0
  >>> nlp_greek_first_sent.tokens[0].end_char
  3
  >>> nlp_greek_first_sent.tokens[0].misc
  >>> nlp_greek_first_sent.tokens[0].pretty_print()
  '<Token id=1;words=[<Word id=1;text=ὅτι;lemma=ὅτι;upos=ADV;xpos=Df;head=13;deprel=advmod>]>'
  >>> nlp_greek_first_sent.tokens[0].to_dict()
  [{'id': 1, 'text': 'ὅτι', 'lemma': 'ὅτι', 'upos': 'ADV', 'xpos': 'Df', 'head': 13, 'deprel': 'advmod', 'start_char': 0, 'end_char': 3}]
  
  >>> first_word = nlp_greek_first_sent.tokens[0].words[0]
  >>> first_word.id
  1
  >>> first_word.text
  'ὅτι'
  >>> first_word.lemma
  'ὅτι'
  >>> first_word.upos
  'ADV'
  >>> first_word.xpos
  'Df'
  >>> first_word.feats
  >>> first_word.head
  13
  >>> first_word.parent
  [
    {
      "id": 1,
      "text": "ὅτι",
      "lemma": "ὅτι",
      "upos": "ADV",
      "xpos": "Df",
      "head": 13,
      "deprel": "advmod",
      "start_char": 0,
      "end_char": 3
    }
  ]
  >>> first_word.misc
  >>> first_word.deprel
  'advmod'
  >>> first_word.pos
  'ADV'
docstr_tok: ["Run","all","available","``","stanza","``","parsing","on","input","text",".",">",">",">","from","cltk.languages.example_texts","import","get_example_text",">",">",">","stanza_wrapper","=","StanzaWrapper","(","language='grc","'",",","stanza_debug_level=","''","INFO","''",",","interactive=False",",","silent=True",")",">",">",">","greek_nlp","=","stanza_wrapper.parse","(","get_example_text","(","``","grc","''",")",")",">",">",">","from","stanza.models.common.doc","import","Document",",","Token",">",">",">","isinstance","(","greek_nlp",",","Document",")","True",">",">",">","nlp_greek_first_sent","=","greek_nlp.sentences","[","0","]",">",">",">","isinstance","(","nlp_greek_first_sent.tokens","[","0","]",",","Token",")","True",">",">",">","nlp_greek_first_sent.tokens","[","0","]",".text","'\u1f45\u03c4\u03b9'",">",">",">","nlp_greek_first_sent.tokens","[","0","]",".words","[","{","``","id","''",":","1",",","``","text","''",":","``","\u1f45\u03c4\u03b9","''",",","``","lemma","''",":","``","\u1f45\u03c4\u03b9","''",",","``","upos","''",":","``","ADV","''",",","``","xpos","''",":","``","Df","''",",","``","head","''",":","13",",","``","deprel","''",":","``","advmod","''",",","``","start_char","''",":","0",",","``","end_char","''",":","3","}","]",">",">",">","nlp_greek_first_sent.tokens","[","0","]",".start_char","0",">",">",">","nlp_greek_first_sent.tokens","[","0","]",".end_char","3",">",">",">","nlp_greek_first_sent.tokens","[","0","]",".misc",">",">",">","nlp_greek_first_sent.tokens","[","0","]",".pretty_print","(",")","'","<","Token","id=1",";","words=","[","<","Word","id=1",";","text=\u1f45\u03c4\u03b9",";","lemma=\u1f45\u03c4\u03b9",";","upos=ADV",";","xpos=Df",";","head=13",";","deprel=advmod",">","]",">","'",">",">",">","nlp_greek_first_sent.tokens","[","0","]",".to_dict","(",")","[","{","'id","'",":","1",",","'text","'",":","'\u1f45\u03c4\u03b9","'",",","'lemma","'",":","'\u1f45\u03c4\u03b9","'",",","'upos","'",":","'ADV","'",",","'xpos","'",":","'Df","'",",","'head","'",":","13",",","'deprel","'",":","'advmod","'",",","'start_char","'",":","0",",","'end_char","'",":","3","}","]",">",">",">","first_word","=","nlp_greek_first_sent.tokens","[","0","]",".words","[","0","]",">",">",">","first_word.id","1",">",">",">","first_word.text","'\u1f45\u03c4\u03b9'",">",">",">","first_word.lemma","'\u1f45\u03c4\u03b9'",">",">",">","first_word.upos","'ADV'",">",">",">","first_word.xpos","'Df'",">",">",">","first_word.feats",">",">",">","first_word.head","13",">",">",">","first_word.parent","[","{","``","id","''",":","1",",","``","text","''",":","``","\u1f45\u03c4\u03b9","''",",","``","lemma","''",":","``","\u1f45\u03c4\u03b9","''",",","``","upos","''",":","``","ADV","''",",","``","xpos","''",":","``","Df","''",",","``","head","''",":","13",",","``","deprel","''",":","``","advmod","''",",","``","start_char","''",":","0",",","``","end_char","''",":","3","}","]",">",">",">","first_word.misc",">",">",">","first_word.deprel","'advmod'",">",">",">","first_word.pos","'ADV","'"]
code: def parse(self, text: str):
      """Run all available ``stanza`` parsing on input text.
  
      >>> from cltk.languages.example_texts import get_example_text
      >>> stanza_wrapper = StanzaWrapper(language='grc', stanza_debug_level="INFO", interactive=False, silent=True)
      >>> greek_nlp = stanza_wrapper.parse(get_example_text("grc"))
      >>> from stanza.models.common.doc import Document, Token
      >>> isinstance(greek_nlp, Document)
      True
  
      >>> nlp_greek_first_sent = greek_nlp.sentences[0]
      >>> isinstance(nlp_greek_first_sent.tokens[0], Token)
      True
      >>> nlp_greek_first_sent.tokens[0].text
      'ὅτι'
      >>> nlp_greek_first_sent.tokens[0].words
      [{
        "id": 1,
        "text": "ὅτι",
        "lemma": "ὅτι",
        "upos": "ADV",
        "xpos": "Df",
        "head": 13,
        "deprel": "advmod",
        "start_char": 0,
        "end_char": 3
      }]
      >>> nlp_greek_first_sent.tokens[0].start_char
      0
      >>> nlp_greek_first_sent.tokens[0].end_char
      3
      >>> nlp_greek_first_sent.tokens[0].misc
      >>> nlp_greek_first_sent.tokens[0].pretty_print()
      '<Token id=1;words=[<Word id=1;text=ὅτι;lemma=ὅτι;upos=ADV;xpos=Df;head=13;deprel=advmod>]>'
      >>> nlp_greek_first_sent.tokens[0].to_dict()
      [{'id': 1, 'text': 'ὅτι', 'lemma': 'ὅτι', 'upos': 'ADV', 'xpos': 'Df', 'head': 13, 'deprel': 'advmod', 'start_char': 0, 'end_char': 3}]
  
      >>> first_word = nlp_greek_first_sent.tokens[0].words[0]
      >>> first_word.id
      1
      >>> first_word.text
      'ὅτι'
      >>> first_word.lemma
      'ὅτι'
      >>> first_word.upos
      'ADV'
      >>> first_word.xpos
      'Df'
      >>> first_word.feats
      >>> first_word.head
      13
      >>> first_word.parent
      [
        {
          "id": 1,
          "text": "ὅτι",
          "lemma": "ὅτι",
          "upos": "ADV",
          "xpos": "Df",
          "head": 13,
          "deprel": "advmod",
          "start_char": 0,
          "end_char": 3
        }
      ]
      >>> first_word.misc
      >>> first_word.deprel
      'advmod'
      >>> first_word.pos
      'ADV'
      """
      parsed_text = self.nlp(text)
      return parsed_text
  
file_path: cltk/src/cltk/dependency/stanza_wrapper.py
imports: import logging
  import os
  from typing import Dict, Optional
  import stanza
  from stanza.models.common.constant import lang2lcode
  from stanza.resources.prepare_resources import default_treebanks
  from cltk.core.exceptions import CLTKException, UnimplementedAlgorithmError, UnknownLanguageError
  from cltk.utils import file_exists, query_yes_no, suppress_stdout
label_desc: Use image node_id 2 for calling the StanzaWrapper obj's underlying member method code with example usage: obj.parse(text) and returns: parsed_text