class_docstr: Class which prettifies morphological tagger output to 4-column
  or 10-column (Universal Dependencies) format.
  Args:
      format_mode: output format,
          in `basic` mode output data contains 4 columns (id, word, pos, features),
          in `conllu` or `ud` mode it contains 10 columns:
          id, word, lemma, pos, xpos, feats, head, deprel, deps, misc
          (see http://universaldependencies.org/format.html for details)
          Only id, word, lemma, tag and pos columns are predicted in current version,
          other columns are filled by `_` value.
      begin: a string to append in the beginning
      end: a string to append in the end
      sep: separator between word analyses
class_docstr_tok: ["Class","which","prettifies","morphological","tagger","output","to","4-column","or","10-column","(","Universal","Dependencies",")","format",".","Args",":","format_mode",":","output","format",",","in","`","basic","`","mode","output","data","contains","4","columns","(","id",",","word",",","pos",",","features",")",",","in","`","conllu","`","or","`","ud","`","mode","it","contains","10","columns",":","id",",","word",",","lemma",",","pos",",","xpos",",","feats",",","head",",","deprel",",","deps",",","misc","(","see","http",":","\/\/universaldependencies.org\/format.html","for","details",")","Only","id",",","word",",","lemma",",","tag","and","pos","columns","are","predicted","in","current","version",",","other","columns","are","filled","by","`","_","`","value",".","begin",":","a","string","to","append","in","the","beginning","end",":","a","string","to","append","in","the","end","sep",":","separator","between","word","analyses"]
docstr: Prettifies output of morphological tagger.
  Args:
      tokens: tokenized source sentence
      tags: list of tags, the output of a tagger
      lemmas: list of lemmas, the output of a lemmatizer
  Returns:
      the prettified output of the tagger.
  Examples:
      >>> sent = "John really likes pizza .".split()
      >>> tags = ["PROPN,Number=Sing", "ADV",
      >>>         "VERB,Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin",
      >>>         "NOUN,Number=Sing", "PUNCT"]
      >>> lemmas = "John really like pizza .".split()
      >>> prettifier = LemmatizedOutputPrettifier()
      >>> self.prettify(sent, tags, lemmas)
          1       John    John    PROPN   _       Number=Sing     _       _       _       _
          2       really  really  ADV     _       _       _       _       _       _
          3       likes   like    VERB    _       Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin   _       _       _       _
          4       pizza   pizza   NOUN    _       Number=Sing     _       _       _       _
          5       .       .       PUNCT   _       _       _       _       _       _
docstr_tok: ["Prettifies","output","of","morphological","tagger",".","Args",":","tokens",":","tokenized","source","sentence","tags",":","list","of","tags",",","the","output","of","a","tagger","lemmas",":","list","of","lemmas",",","the","output","of","a","lemmatizer","Returns",":","the","prettified","output","of","the","tagger",".","Examples",":",">",">",">","sent","=","``","John","really","likes","pizza",".","``",".split","(",")",">",">",">","tags","=","[","``","PROPN",",","Number=Sing","''",",","``","ADV","''",",",">",">",">","``","VERB",",","Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin","''",",",">",">",">","``","NOUN",",","Number=Sing","''",",","``","PUNCT","''","]",">",">",">","lemmas","=","``","John","really","like","pizza",".","``",".split","(",")",">",">",">","prettifier","=","LemmatizedOutputPrettifier","(",")",">",">",">","self.prettify","(","sent",",","tags",",","lemmas",")","1","John","John","PROPN","_","Number=Sing","_","_","_","_","2","really","really","ADV","_","_","_","_","_","_","3","likes","like","VERB","_","Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin","_","_","_","_","4","pizza","pizza","NOUN","_","Number=Sing","_","_","_","_","5",".",".","PUNCT","_","_","_","_","_","_"]
code: def prettify(
      self, tokens: List[str], tags: List[str], lemmas: List[str]
  ) -> Union[List[str], str]:
      """Prettifies output of morphological tagger.
      Args:
          tokens: tokenized source sentence
          tags: list of tags, the output of a tagger
          lemmas: list of lemmas, the output of a lemmatizer
      Returns:
          the prettified output of the tagger.
      Examples:
          >>> sent = "John really likes pizza .".split()
          >>> tags = ["PROPN,Number=Sing", "ADV",
          >>>         "VERB,Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin",
          >>>         "NOUN,Number=Sing", "PUNCT"]
          >>> lemmas = "John really like pizza .".split()
          >>> prettifier = LemmatizedOutputPrettifier()
          >>> self.prettify(sent, tags, lemmas)
              1	John	John	PROPN	_	Number=Sing	_	_	_	_
              2	really	really	ADV	_	_	_	_	_	_
              3	likes	like	VERB	_	Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin	_	_	_	_
              4	pizza	pizza	NOUN	_	Number=Sing	_	_	_	_
              5	.	.	PUNCT	_	_	_	_	_	_
      """
      answer = []
      for i, (word, tag, lemma) in enumerate(zip(tokens, tags, lemmas)):
          pos, tag = make_pos_and_tag(tag, sep=",")
          answer.append(
              self.format_string.format(i + 1, word, lemma, pos, tag)
          )
      if self.return_string:
          answer = self.begin + self.sep.join(answer) + self.end
      return answer
  
file_path: DeepPavlov/deeppavlov/models/morpho_syntax_parser/syntax_parsing.py
imports: from typing import List, Optional, Tuple, Union
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
label_desc: Use image node_id 2 for calling the LemmatizedOutputPrettifier obj's underlying member method code with example usage: obj.prettify(tokens, tags, lemmas) and returns: answer