# Got this from a GitHub gist somewhere. If you made this, please reach out so I can add you to the credits! from glob import iglob import re replacement_words = { "TINYMUSHROOM": "TinyMushroom", "GO-GOGGLES": "Go-Goggles", "POISONPOWDER": "PoisonPowder", "AND": "and" } whole_string_filter = ( "ABC", "DEF", "GHI", "JKL", "MNO", "PQR", "STU", "VWX", "YZ", "ABCDEFG", "ABCDE", "FGHIJ", "KLMNO", "PQRST", "UVWXY", "Z ", "ABCDEF .", "GHIJKL ,", "MNOPQRS ", "TUVWXYZ " ) per_word_filter = ( "TM", "HM", "KO", "HT", "WT", "HP", "PP", "ZZZ", "SR", "JR", "PC", "RPG", "QTY", "PC", "OT" ) is_tmhm_pattern = re.compile(r'TM|HM[0-9]{2}') special_characters = r"éÃãÕõàÀÈÌÒÙàèìòùÛûÁÉÍÓÚáéíóúñÑÇç!#-\-/:-@^_" lookbehind_braces = r"(?