code: def __init__(self, id_, attrs):
      self.id = id_
      # CoNLL format
      if len(attrs) == 10:
          new_attrs = [str(int(attrs[0]) - 1)]
          new_attrs.append(attrs[1])
          new_attrs.append(attrs[3])
          new_attrs.append(str(int(attrs[-4]) - 1))
          new_attrs.append(attrs[-3])
          attrs = new_attrs
      self.label = attrs[-1]
      if self.label.lower() == "root":
          self.label = "ROOT"
      try:
          head = int(attrs[-2])
      except:
          try:
              self.label = "P"
              head = int(attrs[-1])
          except:
              print(attrs)
              raise
      attrs.pop()
      attrs.pop()
      self.head = head
      self.pos = attrs.pop()
      self.word = attrs.pop()
      self.dir = "R" if head >= 0 and head < self.id else "L"
  
file_path: vowpal_wabbit/demo/dependencyparsing/evaluate.py
imports: import os
  import sys
  from collections import defaultdict
label_desc: Use image node_id 1 to create a new Token object from inherited base classes: object with example: obj = Token(id_, attrs)