Package: leetit
leetit1337 translator libInstalation$ pip install leetitUsageSimple example:importleetitprint(leetit.leet("xacker"))print(leetit.leet("xacker",seed=12345,percent=30))TransformationsIn order to get a leetspeak from ordinary English, you need to make three transformations:First you need to replace words and phrases with slang acronyms like "nice one" => "n1" or "owned" => "pwnd". To do this, the leetit library provides theacronymsfunction, which accepts text and an optional seed for the PRNG.importleetitprint(leetit.acronyms("yeah, easy"))print(leetit.acronyms("yeah, easy",seed=12345))Secondly, you need to change the morphology of words, for example, replacing the suffixes-erand-orwith-xoror-zor. To do this, the leetit library provides themorphologyfunction.importleetitprint(leetit.morphology("xacker"))print(leetit.morphology("xacker",seed=12345))Thirdly, you need to replace all or some of the characters with others similar to them in various ways, for example,ecan be replaced with3or&.  To do this, thesubstitutionfunction is provided. In addition to text, this function can also accept the following parameters:The "seed" parameter accepts the seed for the rng.The "percent" parameter specifies which part of the letters will be changed.The "alphabet" parameter accepts a dictionary describing the rules for replacing letters (about dictionaries below).The "chars" parameter accepts a list of letters for which replacement will be performed. By default, all Latin letters are included in this list.AlphabetsAlphabets are dictionaries in which lowercase letters act as the key, and arrays with characters with which this letter can be replaced as the value.The leetit library provides several alphabets out of the box:leetit.ALPHABET_NUMBERS - contains options for replacing letters with numbers. For example,eto3.leetit.ALPHABET_ASCII - contains everything that is in leetit.ALPHABET_NUMBERS, and in addition options for replacing letters with other letters and combinations of letters and numbers. For example,eto&.leetit.ALPHABET_UNICODE_ONLY - contains options for replacing latin letters with special characters and letters of other languages.leetit.ALPHABET_UNICODE - contains a union of leetit.ALPHABET_ASCII and leetit.ALPHABET_UNICODE_ONLYYou can also compose your alphabets.importleetitprint(leetit.substitution("To be, or not to be, that is the question"))print(leetit.substitution("To be, or not to be, that is the question",seed=12345))print(leetit.substitution("To be, or not to be, that is the question",percent=100,alphabet=leetit.ALPHABET_NUMBERS))print(leetit.substitution("To be, or not to be, that is the question",percent=100,alphabet=leetit.ALPHABET_ASCII))print(leetit.substitution("To be, or not to be, that is the question",percent=100,alphabet=leetit.ALPHABET_UNICODE_ONLY))print(leetit.substitution("To be, or not to be, that is the question",percent=100,alphabet=leetit.ALPHABET_UNICODE))MY_ALPHABET={"e":["eeeeeeee"],"o":["oooooooo"],}print(leetit.substitution("To be, or not to be, that is the question",percent=100,alphabet=MY_ALPHABET))And finally, the leetit library provides aleetfunction that performs all three transformations on the text in turn:defleet(text:str,seed:int=1337,percent:int=50,alphabet=ALPHABET_ASCII,chars=string.ascii_lowercase)->strimportleetitprint(leetit.leet("To be, or not to be, that is the question"))