docstr: :param model: any model object
  :param int batch_size: batch size to apply evaluation
  :param Object metrics: metrics takes the predicted labels
  and the ground-truth labels as input and calculates f1, recall
  and precision. It takes a SpanFPreRecMetric metric
  as default, but can also be implemented by the user.
  :param list tag_vocab: a list of tag.
  for mapping tags to indexes.
  :param str encoding_type: supporting 'bio', 'bmes', 'bmeso', 'bioes',
  'bio' as default.
code: def __init__(
      self,
      model,
      batch_size=1,
      metrics=None,
      tag_vocab=["B", "M", "E", "S"],
      encoding_type="bmes",
  ):
      r"""
      :param model: any model object
      :param int batch_size: batch size to apply evaluation
      :param Object metrics: metrics takes the predicted labels
      and the ground-truth labels as input and calculates f1, recall
      and precision. It takes a SpanFPreRecMetric metric
      as default, but can also be implemented by the user.
      :param list tag_vocab: a list of tag.
      for mapping tags to indexes.
      :param str encoding_type: supporting 'bio', 'bmes', 'bmeso', 'bioes',
      'bio' as default.
      """
      super(FlintModelCWS, self).__init__(
          model=model, tokenizer=None, task="CWS", batch_size=batch_size
      )
      # load augments for the model
      self.batch_size = batch_size
      self.model = model
      self.metrics = metrics
      self.tag = tag_vocab
      self.tag_vocab = self.get_vocab(tag_vocab)
      self.encoding_type = encoding_type
      self.metrics2score = {
          "f": "f1_score",
          "pre": "precision",
          "rec": "recall",
      }
  
file_path: textflint/textflint/input/model/flint_model/flint_model_cws.py
imports: import torch
  from .flint_model import FlintModel, TASK_METRICS
label_desc: Use image node_id 1 to create a new FlintModelCWS object from inherited base classes: FlintModel with example: obj = FlintModelCWS(model, batch_size, metrics, tag_vocab, encoding_type)