class_docstr: Find samples that contain tokens unsupported by your tokenizer.
  
  Parameters
  ----------
  tokenizer: t.Any , default: None
      Tokenizer from the HuggingFace transformers library to use for tokenization. If None,
      AutoTokenizer.from_pretrained('bert-base-uncased') will be used.
  group_singleton_words: bool, default: False
      If True, group all words that appear only once in the data into the "Other" category in the display.
  n_most_common : int , default: 5
      Number of most common words with unknown tokens to show in the display.
  n_samples: int, default: 1_000_000
      number of samples to use for this check.
  random_state : int, default: 42
      random seed for all check internals.
  {max_text_length_for_display_param:1*indent}
class_docstr_tok: ["Find","samples","that","contain","tokens","unsupported","by","your","tokenizer",".","Parameters","--","--","--","--","--","tokenizer",":","t.Any",",","default",":","None","Tokenizer","from","the","HuggingFace","transformers","library","to","use","for","tokenization",".","If","None",",","AutoTokenizer.from_pretrained","(","'bert-base-uncased","'",")","will","be","used",".","group_singleton_words",":","bool",",","default",":","False","If","True",",","group","all","words","that","appear","only","once","in","the","data","into","the","``","Other","''","category","in","the","display",".","n_most_common",":","int",",","default",":","5","Number","of","most","common","words","with","unknown","tokens","to","show","in","the","display",".","n_samples",":","int",",","default",":","1_000_000","number","of","samples","to","use","for","this","check",".","random_state",":","int",",","default",":","42","random","seed","for","all","check","internals",".","{","max_text_length_for_display_param:1","*","indent","}"]
code: def __init__(
      self,
      tokenizer: t.Any = None,
      group_singleton_words: bool = False,
      n_most_common: int = 5,
      n_samples: int = 1_000_000,
      random_state: int = 42,
      max_text_length_for_display: int = 30,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.tokenizer = copy.deepcopy(tokenizer)
      if tokenizer is None:
          try:
              from transformers import (
                  AutoTokenizer,
              )  # pylint: disable=W0611,C0415 # noqa
          except ImportError as e:
              raise DeepchecksProcessError(
                  "Tokenizer was not provided. In order to use checks default "
                  "tokenizer (bert-base-uncased), please run:\n>> pip install transformers>=4.27.4."
              ) from e
          self.tokenizer = AutoTokenizer.from_pretrained(
              "bert-base-uncased"
          )
      else:
          self._validate_tokenizer()
      self._use_fast_method = self.tokenizer.is_fast
      # We're not feeding the data to a model, so we don't need to limit the length
      self.tokenizer.model_max_length = sys.maxsize
  
      self.group_singleton_words = group_singleton_words
      self.n_most_common = n_most_common
      self.n_samples = n_samples
      self.random_state = random_state
      self.max_text_length_for_display = max_text_length_for_display
  
imports: import contextlib
  import copy
  import sys
  import typing
  import warnings
  from collections import Counter
  import nltk
  import plotly.graph_objects
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.core.errors import DeepchecksProcessError, DeepchecksValueError
  from deepchecks.nlp import Context, SingleDatasetCheck
  from deepchecks.nlp._shared_docs import docstrings
  from deepchecks.nlp.text_data import TextData
  from deepchecks.utils.numbers import round_sig
  from deepchecks.utils.strings import format_list, format_percent, truncate_string
label_desc: Use image node_id 1 to create a new UnknownTokens object from inherited base classes: SingleDatasetCheck with example: obj = UnknownTokens(tokenizer, group_singleton_words, n_most_common, n_samples, random_state, max_text_length_for_display)