class_docstr: Token classification evaluator.
  
  This token classification evaluator can currently be loaded from [`evaluator`] using the default task name
  `token-classification`.
  
  Methods in this class assume a data format compatible with the [`~transformers.TokenClassificationPipeline`].
class_docstr_tok: ["Token","classification","evaluator",".","This","token","classification","evaluator","can","currently","be","loaded","from","[","`","evaluator","`","]","using","the","default","task","name","`","token-classification","`",".","Methods","in","this","class","assume","a","data","format","compatible","with","the","[","`","~transformers.TokenClassificationPipeline","`","]","."]
code: def prepare_pipeline(
      self,
      model_or_pipeline: Union[
          str,
          "Pipeline",
          Callable,
          "PreTrainedModel",
          "TFPreTrainedModel",
      ],  # noqa: F821
      tokenizer: Union[
          "PreTrainedTokenizerBase", "FeatureExtractionMixin"
      ] = None,  # noqa: F821
      feature_extractor: Union[
          "PreTrainedTokenizerBase", "FeatureExtractionMixin"
      ] = None,  # noqa: F821
      device: int = None,
  ):
      pipe = super().prepare_pipeline(
          model_or_pipeline, tokenizer, feature_extractor, device
      )
  
      # check the pipeline outputs start characters in its predictions
      dummy_output = pipe(
          ["2003 New York Gregory"], **self.PIPELINE_KWARGS
      )
      if dummy_output[0][0]["start"] is None:
          raise ValueError(
              "TokenClassificationEvaluator supports only pipelines giving 'start' index as a pipeline output (got None). "
              "Transformers pipelines with a slow tokenizer will raise this error."
          )
  
      return pipe
  
file_path: evaluate/src/evaluate/evaluator/token_classification.py
imports: from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Union
  from datasets import ClassLabel, Dataset, Sequence
  from typing_extensions import Literal
  from ..module import EvaluationModule
  from ..utils.file_utils import add_end_docstrings, add_start_docstrings
  from .base import EVALUATOR_COMPUTE_RETURN_DOCSTRING, EVALUTOR_COMPUTE_START_DOCSTRING, Evaluator
  from .utils import DatasetColumn
label_desc: Use image node_id 5 for calling the TokenClassificationEvaluator obj's underlying member method code with example usage: obj.prepare_pipeline(model_or_pipeline, tokenizer, feature_extractor, device) and returns: pipe