class_docstr: Class designed to confirm whether something is **language** based on how many words of **language** appears
  Call confirmLanguage(text, language)
  * text: the text you want to confirm
  * language: the language you want to confirm
  
  Find out what language it is by using chisquared.py, the highest chisquared score is the language
  languageThreshold = 45
  if a string is 45% **language** words, then it's confirmed to be english
class_docstr_tok: ["Class","designed","to","confirm","whether","something","is","*","*","language","*","*","based","on","how","many","words","of","*","*","language","*","*","appears","Call","confirmLanguage","(","text",",","language",")","*","text",":","the","text","you","want","to","confirm","*","language",":","the","language","you","want","to","confirm","Find","out","what","language","it","is","by","using","chisquared.py",",","the","highest","chisquared","score","is","the","language","languageThreshold","=","45","if","a","string","is","45","%","*","*","language","*","*","words",",","then","it","'s","confirmed","to","be","english"]
docstr: Checks to see if the text is in English
  
  Performs a decryption, but mainly parses the internal data packet and prints useful information.
  
  Args:
      text -> The text we use to perform analysis on
  
  Returns:
      bool -> True if the text is English, False otherwise.
docstr_tok: ["Checks","to","see","if","the","text","is","in","English","Performs","a","decryption",",","but","mainly","parses","the","internal","data","packet","and","prints","useful","information",".","Args",":","text","-",">","The","text","we","use","to","perform","analysis","on","Returns",":","bool","-",">","True","if","the","text","is","English",",","False","otherwise","."]
code: def check(self, text: str) -> Optional[str]:
      """Checks to see if the text is in English
  
      Performs a decryption, but mainly parses the internal data packet and prints useful information.
  
      Args:
          text -> The text we use to perform analysis on
  
      Returns:
          bool -> True if the text is English, False otherwise.
  
      """
      logging.debug(f'In Language Checker with "{text}"')
      text = self.clean_text(text)
      logging.debug(f'Text split to "{text}"')
      if text == "":
          logging.debug(
              "Returning None from Brandon as the text cleaned is none."
          )
          return None
  
      length_text = len(text)
  
      what_to_use = {}
  
      # this code decides what checker / threshold to use
      # if text is over or equal to maximum size, just use the maximum possible checker
      what_to_use = self.calculateWhatChecker(
          length_text, self.thresholds_phase1.keys()
      )
      logging.debug(self.thresholds_phase1)
      what_to_use = self.thresholds_phase1[str(what_to_use)]
      # def checker(self, text: str, threshold: float, text_length: int, var: set) -> bool:
      if "check" in what_to_use:
          # perform check 1k words
          result = self.checker(
              text, what_to_use["check"], length_text, self.top1000Words
          )
      elif "stop" in what_to_use:
          # perform stopwords
          result = self.checker(
              text, what_to_use["stop"], length_text, self.stopwords
          )
      elif "dict" in what_to_use:
          result = self.checker(
              text, what_to_use["dict"], length_text, self.wordlist
          )
          # If result is None, no point doing it again in phase2
          if not result:
              return None
      else:
          logging.info(
              f"It is neither stop or check, but instead {what_to_use}"
          )
  
      # return False if phase 1 fails
      if not result:
          return None
      else:
          what_to_use = self.calculateWhatChecker(
              length_text, self.thresholds_phase2.keys()
          )
          what_to_use = self.thresholds_phase2[str(what_to_use)]
          result = self.checker(
              text, what_to_use["dict"], length_text, self.wordlist
          )
      return "" if result else None
  
file_path: Ciphey/ciphey/basemods/Checkers/brandon.py
imports: import sys
  from math import ceil
  from typing import Dict, Optional
  import logging
  from rich.logging import RichHandler
  from ciphey.iface import Checker, Config, ParamSpec, T, registry
label_desc: Use image node_id 5 for calling the Brandon obj's underlying member method code with example usage: obj.check(text) and returns: unknown, None, None, None