def __init__(self, config: Config): super().__init__(config) self.SOUNDEX_DICT = config.get_resource(self._params()["dict"], Translation) self.word_freq = config.get_resource(self._params()["freq"], Translation) self.frequency_dict = {} self.sentence_freq = 0
def __init__(self, config: Config): # Suppresses warning super().__init__(config) self.mh = mh.mathsHelper() phases = config.get_resource(self._params()["phases"]) self.thresholds_phase1 = phases["1"] self.thresholds_phase2 = phases["2"] self.top1000Words = config.get_resource(self._params().get("top1000")) self.wordlist = config.get_resource(self._params()["wordlist"]) self.stopwords = config.get_resource(self._params().get("stopwords")) self.len_phase1 = len(self.thresholds_phase1) self.len_phase2 = len(self.thresholds_phase2)
def __init__(self, config: Config): super().__init__(config) self.group = list(self._params()["group"]) self.expected = config.get_resource(self._params()["expected"]) self.alphabet_length = len(self.group) self.cache = config.cache self.plaintext_prob_threshold = 0.01
def __init__(self, config: Config): super().__init__(config) self.group = list(self._params()["group"]) self.expected = config.get_resource(self._params()["expected"]) self.ALPHABET_LENGTH = len(self.group) self.cache = config.cache self.PLAINTEXT_PROB_THRESHOLD = 0.01
def __init__(self, config: Config): super().__init__(config) self.MORSE_CODE_DICT = config.get_resource(self._params()["dict"], Translation) self.MORSE_CODE_DICT_INV = { v: k for k, v in self.MORSE_CODE_DICT.items() }
def __init__(self, config: Config): super().__init__(config) self.regexes = [] for i in self._params()["resource"]: self.regexes += [ re.compile(regex) for regex in config.get_resource(i) ] logging.debug(f"There are {len(self.regexes)} regexes")
def __init__(self, config: Config): super().__init__(config) self.lower: Union[str, bool] = self._params()["lower"] if not isinstance(self.lower, bool): self.lower = util.strtobool(self.lower) self.group = list(self._params()["group"]) self.expected = config.get_resource(self._params()["expected"]) self.cache = config.cache self.p_value = float(self._params()["p_value"])
def __init__(self, config: Config): super().__init__(config) self.expected = config.get_resource(self._params()["expected"]) self.cache = config.cache self.keysize = self._params().get("keysize") if self.keysize is not None: self.keysize = int(self.keysize) self.p_value = self._params()["p_value"] self.max_key_length = 16
def __init__(self, config: Config): super().__init__(config) self.lower: Union[str, bool] = self._params()["lower"] if not isinstance(self.lower, bool): self.lower = util.strtobool(self.lower) self.group = list(self._params()["group"]) self.expected = config.get_resource(self._params()["expected"]) self.cache = config.cache self.keysize = self._params().get("keysize") if self.keysize is not None: self.keysize = int(self.keysize) self.p_value = float(self._params()["p_value"]) self.detect_p_value = float(self._params()["detect_p_value"]) self.clamp = int(self._params()["clamp"]) self.max_key_length = 16
def __init__(self, config: Config): super().__init__(config) self.expected = config.get_resource(self._params()["expected"]) self.cache = config.cache self.p_value = self._params()["p_value"]
def __init__(self, config: Config): super().__init__(config) self.TABLE = config.get_resource(self._params()["dict"], Translation)
def __init__(self, config: Config): super().__init__(config) self.GALACTIC_DICT = config.get_resource(self._params()["dict"], WordList)
def __init__(self, config: Config): super().__init__(config) self.ALPHABET = config.get_resource(self._params()["dict"], WordList)
def __init__(self, config: Config): super().__init__(config) self.BACONIAN_DICT = config.get_resource(self._params()["dict"], Translation) self.expected = config.get_resource(self._params()["expected"]) self.cache = config.cache
def __init__(self, config: Config): super().__init__(config) self.QUADGRAMS_DICT = config.get_resource(self._params()["dict"], Translation) self.threshold = float(self._params()["score"])