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","`","]","."]
docstr: input_column (`str`, defaults to `"tokens"`):
      The name of the column containing the tokens feature in the dataset specified by `data`.
  label_column (`str`, defaults to `"label"`):
      The name of the column containing the labels in the dataset specified by `data`.
  join_by (`str`, *optional*, defaults to `" "`):
      This evaluator supports dataset whose input column is a list of words. This parameter specifies how to join
      words to generate a string input. This is especially useful for languages that do not separate words by a space.
docstr_tok: ["input_column","(","`","str","`",",","defaults","to","`","``","tokens","''","`",")",":","The","name","of","the","column","containing","the","tokens","feature","in","the","dataset","specified","by","`","data","`",".","label_column","(","`","str","`",",","defaults","to","`","``","label","''","`",")",":","The","name","of","the","column","containing","the","labels","in","the","dataset","specified","by","`","data","`",".","join_by","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","``","`",")",":","This","evaluator","supports","dataset","whose","input","column","is","a","list","of","words",".","This","parameter","specifies","how","to","join","words","to","generate","a","string","input",".","This","is","especially","useful","for","languages","that","do","not","separate","words","by","a","space","."]
code: def compute(
      self,
      model_or_pipeline: Union[
          str,
          "Pipeline",
          Callable,
          "PreTrainedModel",
          "TFPreTrainedModel",  # noqa: F821
      ] = None,
      data: Union[str, Dataset] = None,
      subset: Optional[str] = None,
      split: str = None,
      metric: Union[str, EvaluationModule] = None,
      tokenizer: Optional[
          Union[str, "PreTrainedTokenizer"]
      ] = None,  # noqa: F821
      strategy: Literal["simple", "bootstrap"] = "simple",
      confidence_level: float = 0.95,
      n_resamples: int = 9999,
      device: Optional[int] = None,
      random_state: Optional[int] = None,
      input_column: str = "tokens",
      label_column: str = "ner_tags",
      join_by: Optional[str] = " ",
  ) -> Tuple[Dict[str, float], Any]:
      """
      input_column (`str`, defaults to `"tokens"`):
          The name of the column containing the tokens feature in the dataset specified by `data`.
      label_column (`str`, defaults to `"label"`):
          The name of the column containing the labels in the dataset specified by `data`.
      join_by (`str`, *optional*, defaults to `" "`):
          This evaluator supports dataset whose input column is a list of words. This parameter specifies how to join
          words to generate a string input. This is especially useful for languages that do not separate words by a space.
      """
      result = {}
  
      self.check_for_mismatch_in_device_setup(device, model_or_pipeline)
  
      # Prepare inputs
      data = self.load_data(data=data, subset=subset, split=split)
      metric_inputs, pipe_inputs = self.prepare_data(
          data=data,
          input_column=input_column,
          label_column=label_column,
          join_by=join_by,
      )
      pipe = self.prepare_pipeline(
          model_or_pipeline=model_or_pipeline,
          tokenizer=tokenizer,
          device=device,
      )
      metric = self.prepare_metric(metric)
  
      # Compute predictions
      predictions, perf_results = self.call_pipeline(pipe, pipe_inputs)
      predictions = self.predictions_processor(
          predictions, data[input_column], join_by
      )
      metric_inputs.update(predictions)
  
      # Compute metrics from references and predictions
      metric_results = self.compute_metric(
          metric=metric,
          metric_inputs=metric_inputs,
          strategy=strategy,
          confidence_level=confidence_level,
          n_resamples=n_resamples,
          random_state=random_state,
      )
  
      result.update(metric_results)
      result.update(perf_results)
  
      return result
  
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 6 for calling the TokenClassificationEvaluator obj's underlying member method code with example usage: obj.compute(model_or_pipeline, data, subset, split, metric, tokenizer, strategy, confidence_level, n_resamples, device, random_state, input_column, label_column, join_by) and returns: result