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","}"]
docstr: Add condition that checks if the ratio of unknown words is less than a given ratio.
  
  Parameters
  ----------
  ratio : float
      Maximal allowed ratio of unknown words.
docstr_tok: ["Add","condition","that","checks","if","the","ratio","of","unknown","words","is","less","than","a","given","ratio",".","Parameters","--","--","--","--","--","ratio",":","float","Maximal","allowed","ratio","of","unknown","words","."]
code: def add_condition_ratio_of_unknown_words_less_or_equal(
      self, ratio: float = 0
  ):
      """Add condition that checks if the ratio of unknown words is less than a given ratio.
  
      Parameters
      ----------
      ratio : float
          Maximal allowed ratio of unknown words.
      """
  
      def condition(result):
          passed = result["unknown_word_ratio"] <= ratio
          condition_result = (
              ConditionCategory.FAIL
              if not passed
              else ConditionCategory.PASS
          )
          details = f'Ratio was {format_percent(result["unknown_word_ratio"])}'
          return ConditionResult(condition_result, details)
  
      return self.add_condition(
          f"Ratio of unknown words is less than {format_percent(ratio)}",
          condition,
      )
  
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 7 for calling the UnknownTokens obj's underlying member method code with example usage: obj.add_condition_ratio_of_unknown_words_less_or_equal(ratio) and returns: self, ConditionResult