:mod:`lookout.style.typos.research.create_typos` ================================================ .. py:module:: lookout.style.typos.research.create_typos Module Contents --------------- .. data:: letters .. function:: rand_insert(string:str) Add random letter inside a string .. function:: rand_delete(string:str) Delete random symbol from a string .. function:: rand_substitution(string) Substitute random symbol with a letter inside a string .. function:: rand_swap(string) Swap two random consequent symbols .. function:: rand_typo(string) Make random typo in a string .. function:: corrupt(data_file, typo_probability, add_typo_probability, out_file) Augment some of identifiers from dataframe with TYPO_PROBABILITY, consequent typos in the same word happen with ADD_TYPO_PROBABILITY each .. function:: corrupt_splits(data_file, typo_probability, add_typo_probability, out_file, repeats:int=1) .. function:: train_test_split(data_file, test_portion) Randomly split data on train and test .. function:: create_typos(args)