code: def __init__(self, encoding_type=None, tag_vocab=None):
      self.all_word = 0.0
      self.pred_word = 0.0
      self.pred_real_word = 0.0
      self.encoding_type = encoding_type
      if self.encoding_type == "bmes":
          self.tag_to_span_func = self._bmes_tag_to_spans
      elif self.encoding_type == "bio":
          self.tag_to_span_func = self._bio_tag_to_spans
      elif self.encoding_type == "bioes":
          self.tag_to_span_func = self._bioes_tag_to_spans
      else:
          raise ValueError(
              "Only support 'bio', 'bmes', 'bmeso', 'bioes' type."
          )
      self.tag_vocab = tag_vocab
  
file_path: textflint/textflint/input/model/metrics/nerspanmetric.py
imports: from abc import ABC
label_desc: Use image node_id 1 to create a new NERSpanMetric object from inherited base classes: ABC with example: obj = NERSpanMetric(encoding_type, tag_vocab)