# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['mrs_spellings', 'mrs_spellings.qwerty_caches']

package_data = \
{'': ['*']}

setup_kwargs = {
    'name': 'mrs-spellings',
    'version': '1.0.2',
    'description': 'a micro utility for generating plausible misspellings',
    'long_description': '# MrS SpELliNgS\na micro utility to procedurally generate plausible misspellings\n\n<div align="center">\n  <a href="https://badge.fury.io/py/mrs-spellings"><img src="https://badge.fury.io/py/mrs-spellings.svg" alt="PyPI version" height="18"></a>\n<a href="https://codecov.io/gh/CircArgs/mrs_spellings">\n  <img src="https://codecov.io/gh/CircArgs/mrs_spellings/branch/master/graph/badge.svg" />\n</a>\n \n<img alt="Build Status" src="https://github.com/CircArgs/mrs_spellings/workflows/test/badge.svg">\n<img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg">\n<img alt="Language Python" src="https://img.shields.io/badge/language-Python-blue">\n</div>\n\n---\n# [Table of Contents](#table-of-contents)\n- [MrS SpELliNgS](#mrs-spellings)\n- [Install](#install)\n    + [from pypi](#from-pypi)\n    + [from source](#from-source)\n- [Use Cases](#use-cases)\n- [Usage](#usage)\n- [Methods](#methods)\n  * [deletion](#deletion)\n  * [swapping](#swapping)\n  * [qwerty distance (taxi-cab) based swapping](#qwerty-distance-taxi-cab-based-swapping)\n  * [What is QWERTY distance?](#what-is-qwerty-distance)\n---\n# Install\n\n### from pypi\n\n`pip install mrs-spellings`\n\n### from source\n\n`python -m pip install git+https://github.com/CircArgs/mrs_spellings.git`\n\n# Use Cases\n\n- Generate misspellings to replace during the text cleaning process with low overhead\n- Replace words with their potential misspellings as an augmentation during\n  - training to make your model less susceptible to misspellings\n  - during test time as part of TTA\n- Supplement an existing solution for out-of-vocabulary words/ words that do not appear in an existing replacement dictionary\n\n# Usage\n\nThere are 3 primary methods currently supported:\n  * [deletion](#deletion)\n  * [swapping](#swapping)\n  * [qwerty distance (taxi-cab) based swapping](#qwerty-distance-taxi-cab-based-swapping)\n```python\nIn [1]: from mrs_spellings import MrsWord, MrsSpellings                                                                                                                                                            \n#methods return MrsSpellings\nIn [2]: MrsWord("hello").swap()                                                                                                                                                                      \nOut[2]: {\'ehllo\', \'hello\', \'helol\', \'hlelo\'}\n\nIn [3]: MrsWord("hello").delete(number_deletes=1)                                                                                                                                                    \nOut[3]: {\'ello\', \'hell\', \'helo\', \'hllo\'}\n\nIn [4]: MrsWord("hello").qwerty_swap(max_distance=1)                                                                                                                                                 \nOut[4]: \n{\'gello\',\n \'h3llo\',\n \'hdllo\',\n \'he,lo\',\n \'he:lo\',\n  ...\n \'jello\',\n \'nello\',\n \'yello\'}\n# simply chain methods\nIn [5]: MrsWord("hello").swap().delete()                                                                                                                                                             \nOut[5]: \n{\'ehll\',\n \'ehlo\',\n \'ello\',\n  ...\n \'hllo\',\n \'hlol\',\n \'lelo\'}\n \n# MrsWord is a string\nIn [6]: MrsWord("Hello") + " " + MrsWord("World")                                                                                                                                                        \nOut[6]: \'Hello World\'\n\nIn [7]: MrsWord("Hello {}").format("world")                                                                                                                                                      \nOut[7]: \'Hello world\'\n\n# MrsSpellings work as sets\nIn [8]: MrsWord("hello").swap().union(MrsWord("world").delete())                                                                                                                        \nOut[8]: {\'ehllo\', \'hello\', \'helol\', \'hlelo\', \'orld\', \'wold\', \'word\', \'worl\', \'wrld\'}\n\nIn [9]: MrsWord("hello").delete(1)-MrsWord("hello").delete(1)                                                                                                                                        \nOut[9]: set()\n\nIn [10]: " ".join(MrsWord("Hello").qwerty_swap())                                                                                                                                                     \nOut[10]: \'Helko Hdllo Yello He,lo Helll Hellp Hel,o Nello Heklo Hrllo H3llo Gello Heolo He:lo Helli Hell9 Heloo Hel:o Jello Hwllo\'\n```\n\n# Methods\n\n## deletion\n```python\nSignature: MrsWord.delete(number_deletes=1)\nDocstring:\ndelete some number `number_deletes` from this word\n\nArgs:\n    number_deletes (int): number of deletions to perform\n\nReturns:\n    MrsSpellings (set): all possible misspellings that form as a result of `number_deletes` deletions\n```\n\n## swapping\n```python\nSignature: MrsWord.swap()\nDocstring:\nswap some consecutive characters\n\nArgs:\n\nReturns:\n    MrsSpellings (set): all possible misspellings that form as a result of swapping consecutive characters\n```\n\n## qwerty distance (taxi-cab) based swapping\n```python\nSignature: MrsWord.qwerty_swap(max_distance=1)\nDocstring:\n\nswap characters with their qwerty neighbors\n\nArgs:\n    max_distance (int): the max distance (taxi-cab) of keys on the keyboard to swap\n                        e.g. `max_distance=1` then "g" could become one of ["f", "h"]\n                            `max_distance=2` then "g" could become one of [\'f\', \'h\', \'t\', \'y\', \'v\', \'b\']\n                            Note: The number of swaps possible increases with distance however the increase is not always uniform.\n                            For example, the 3rd set of keys from g is [\'6\', \'d\', \'j\'] while the second was [\'t\', \'y\', \'v\', \'b\']\nReturns:\n    MrsSpellings (set): all possible misspellings that form as a result of swapping characters with qwerty neighbors\n\n```\n\n### what is qwerty distance?\n\nQwerty distance is the distance between keys on the typical keyboard. For the purposes of this package, the following assumptions are made:\n\n- each row has half a key offset\n- the l1 distance is a good estimate of the natural travel distance between keys on the keyboard\n- the shift key can add distance by virtue of requiring a hold-down\n\nHere is an example of the results of these assumptions. The closest keys grouped by equal distance (groups in ascending order to furthest distance) to the `g` key are:\n```python\n[[\'f\', \'h\'],\n [\'t\', \'y\', \'v\', \'b\'],\n [\'6\', \'d\', \'j\'],\n [\'r\', \'u\', \'c\', \'n\'],\n [\'^\', \'5\', \'7\', \'s\', \'k\'],\n [\'e\', \'i\', \'x\', \'m\'],\n [\'%\', \'&\', \'4\', \'8\', \'a\', \'l\'],\n [\'w\', \'o\', \'z\', \'<\'],\n [\'$\', \'*\', \'3\', \'9\', \':\'],\n [\'q\', \'p\', \',\'],\n [\'#\', \'(\', \'2\', \'0\', \';\'],\n [\'[\', \'>\'],\n [\'@\', \')\', \'1\', \'-\', \'"\'],\n [\']\', \'.\'],\n [\'!\', \'_\', \'`\', \'=\', "\'"],\n [\'\\\\\', \'?\'],\n [\'~\', \'+\', \'{\'],\n [\'/\'],\n [\'}\'],\n [\'|\']]\n ```\n',
    'author': 'CircArgs',
    'author_email': 'quebecname@gmail.com',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/CircArgs/mrs_spellings',
    'packages': packages,
    'package_data': package_data,
    'python_requires': '>=3.6,<4.0',
}


setup(**setup_kwargs)
