class_docstr: The CoNLL object holds ten fields required for CoNLL-X data format.
  Each field can be binded with one or more :class:`Field` objects. For example,
  ``FORM`` can contain both :class:`Field` and :class:`SubwordField` to produce tensors for words and subwords.
  
  Attributes:
      ID:
          Token counter, starting at 1.
      FORM:
          Words in the sentence.
      LEMMA:
          Lemmas or stems (depending on the particular treebank) of words, or underscores if not available.
      CPOS:
          Coarse-grained part-of-speech tags, where the tagset depends on the treebank.
      POS:
          Fine-grained part-of-speech tags, where the tagset depends on the treebank.
      FEATS:
          Unordered set of syntactic and/or morphological features (depending on the particular treebank),
          or underscores if not available.
      HEAD:
          Heads of the tokens, which are either values of ID or zeros.
      DEPREL:
          Dependency relations to the HEAD.
      PHEAD:
          Projective heads of tokens, which are either values of ID or zeros, or underscores if not available.
      PDEPREL:
          Dependency relations to the PHEAD, or underscores if not available.
  
  References:
      - Sabine Buchholz and Erwin Marsi. 2006.
        `CoNLL-X Shared Task on Multilingual Dependency Parsing`_.
  
  .. _CoNLL-X Shared Task on Multilingual Dependency Parsing:
      https://www.aclweb.org/anthology/W06-2920/
class_docstr_tok: ["The","CoNLL","object","holds","ten","fields","required","for","CoNLL-X","data","format",".","Each","field","can","be","binded","with","one","or","more",":","class",":","`","Field","`","objects",".","For","example",",","``","FORM","``","can","contain","both",":","class",":","`","Field","`","and",":","class",":","`","SubwordField","`","to","produce","tensors","for","words","and","subwords",".","Attributes",":","ID",":","Token","counter",",","starting","at","1",".","FORM",":","Words","in","the","sentence",".","LEMMA",":","Lemmas","or","stems","(","depending","on","the","particular","treebank",")","of","words",",","or","underscores","if","not","available",".","CPOS",":","Coarse-grained","part-of-speech","tags",",","where","the","tagset","depends","on","the","treebank",".","POS",":","Fine-grained","part-of-speech","tags",",","where","the","tagset","depends","on","the","treebank",".","FEATS",":","Unordered","set","of","syntactic","and\/or","morphological","features","(","depending","on","the","particular","treebank",")",",","or","underscores","if","not","available",".","HEAD",":","Heads","of","the","tokens",",","which","are","either","values","of","ID","or","zeros",".","DEPREL",":","Dependency","relations","to","the","HEAD",".","PHEAD",":","Projective","heads","of","tokens",",","which","are","either","values","of","ID","or","zeros",",","or","underscores","if","not","available",".","PDEPREL",":","Dependency","relations","to","the","PHEAD",",","or","underscores","if","not","available",".","References",":","-","Sabine","Buchholz","and","Erwin","Marsi",".","2006",".","`","CoNLL-X","Shared","Task","on","Multilingual","Dependency","Parsing","`","_",".","..","_CoNLL-X","Shared","Task","on","Multilingual","Dependency","Parsing",":","https",":","\/\/www.aclweb.org\/anthology\/W06-2920\/"]
docstr: Converts a list of tokens to a string in CoNLL-X format.
  Missing fields are filled with underscores.
  
  Args:
      tokens (list[str] or list[tuple]):
          This can be either a list of words or word/pos pairs.
  
  Returns:
      A string in CoNLL-X format.
  
  Examples:
      >>> print(CoNLL.toconll(['She', 'enjoys', 'playing', 'tennis', '.']))
      1       She     _       _       _       _       _       _       _       _
      2       enjoys  _       _       _       _       _       _       _       _
      3       playing _       _       _       _       _       _       _       _
      4       tennis  _       _       _       _       _       _       _       _
      5       .       _       _       _       _       _       _       _       _
code: def toconll(cls, tokens):
      r"""
      Converts a list of tokens to a string in CoNLL-X format.
      Missing fields are filled with underscores.
  
      Args:
          tokens (list[str] or list[tuple]):
              This can be either a list of words or word/pos pairs.
  
      Returns:
          A string in CoNLL-X format.
  
      Examples:
          >>> print(CoNLL.toconll(['She', 'enjoys', 'playing', 'tennis', '.']))
          1       She     _       _       _       _       _       _       _       _
          2       enjoys  _       _       _       _       _       _       _       _
          3       playing _       _       _       _       _       _       _       _
          4       tennis  _       _       _       _       _       _       _       _
          5       .       _       _       _       _       _       _       _       _
  
      """
  
      if isinstance(tokens[0], str):
          s = "\n".join(
              [
                  f"{i}\t{word}\t" + "\t".join(["_"] * 8)
                  for i, word in enumerate(tokens, 1)
              ]
          )
      else:
          s = "\n".join(
              [
                  f"{i}\t{word}\t_\t{tag}\t" + "\t".join(["_"] * 6)
                  for i, (word, tag) in enumerate(tokens, 1)
              ]
          )
      return s + "\n"
  
imports: from collections.abc import Iterable
  import nltk
  from tqdm import tqdm
  from underthesea.utils.sp_parallel import is_master
label_desc: Use image node_id 6 for calling the CoNLL obj's underlying member method code with example usage: obj.toconll(cls, tokens) and returns: unknown