{ "info": { "author": "Nathan Woodger", "author_email": "woodgern@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "[![Build Status](https://travis-ci.org/woodgern/confusables.svg?branch=master)](https://travis-ci.org/woodgern/confusables) [![PyPI version](https://badge.fury.io/py/confusables.svg)](https://badge.fury.io/py/confusables)\n\n\n# Confusables\n\nConfusables is a python package that provides functionality for analyzing and matching words that \"appear\"\nto be the same or similar, but use different characters.\n\nConfusables uses the unicode confusable characters list (https://www.unicode.org/Public/security/8.0.0/confusables.txt)\nalong with other methods of matching characters.\n\nThis package can be used for any application where detecting words using any unexpected characters to pass filters\nis required. This could include finding malicious fake website names, analyzing or normalizing text data, or even detecting\nattempts to get past a profanity filter.\n\n\n## Installation\n\nConfusables can be installed through pip using\n`pip3 install confusables`\n\n\n## Usage\n\nThe functions in the confusables module focus around comparing and finding strings that can be considered \"confusable\". This means that they can be humanly interpretable as the same string. Since this deals with human interpretation, the \"confusable\" definition is loose, and in later versions may be more or less strict.\n\nCurrently, confusables provides: `is_confusable`, `confusable_characters`, and `confusable_regex`\n\n\n`is_confusable(string1, string2)` takes in 2 strings and outputs whether or not the two are \"confusable\". Keep in mind that in some cases, a single character can be confusable with 2 characters combined (eg. \u203c is a single character, !! is two)\n```\nfrom confusables import is_confusable\n\nprint(is_confusable('rover', '\u01a6\u1ecf\ud835\udd4d3\u211b'))\n# prints True\n```\n\n\n\n`confusable_characters(char)` takes in a character and outputs a list of characters that are confusable with it. In some cases, as mentioned above, a single characters can be confusables with multiple characters, in which case those characters will be inluded in the list in the form of a string.\n```\nfrom confusables import confusables_characters\n\nprint(confusable_characters('c'))\n# prints ['\u010b', '\u1d04', '\ud835\udd20', '\ud835\udc84', '\ud835\uddf0', '\ud835\uddd6', '\u1e09', '\u2102', '\u13df', '\u0107', 'c\u0326', '\ud835\udc50', '\ud835\udcec', '\ud835\ude8c', '\ud800\udf02', '\u216d', '\u0421', '\ud835\ude24', '\uff43', '\u04ab', '\ud835\udd88', '\ud83d\udf4c', '\ud835\udda2', '\ud835\udc02', 'C', '\ud835\udcd2', '\u00c7', '\ud835\ude3e', '\u00e7', '\u2ca4', '\u0441', '\u217d', '\u0109', '\ud801\udd1c', 'c', '\u212d', '\u03f2', '\ud806\udce9', '\u03f9', '\ud835\udd6e', '\u010d', '\ud800\udea2', '\u0108', '\ud835\udc6a', '\uff23', '\ud806\udcf2', '\ud801\udc15', '\ud801\udc3d', '\u2ca5', '\ud835\udc36', '\u010a', 'C\u0326', '\uabaf', '\ud835\udc9e', '\ud835\udd54', '\ud835\ude0a', '\u010c', '\ua4da', '\ud835\udcb8', '\ud835\udc1c', '\ud835\ude72', '\ud835\uddbc', '\u0106', '\ud835\ude58', '\u1e08']\n```\n\n\n`confusable_regex(string, include_character_padding=False)` takes a string and outputs a regex string that matches words that are confusable with the input string.\n```\nfrom confusables import confusable_regex\nimport re\n\nregex_string = confusable_regex('bore', include_character_padding=True)\nregex = re.compile(regex_string)\n\nprint(regex.search('Sometimes people say that life can be a \u044c.\ud835\udf82.\u0159.\u025c, but I don\\'t agree'))\n# prints <_sre.SRE_Match object; span=(40, 47), match='\u044c.\ud835\udf82.\u0159.\u025c'>\n```\n\n\n\n`normalize(string, prioritize_alpha=False)` takes a string and outputs a list of possible \"normal forms\". This means that characters in the string get converted to their confusable ascii counterparts. The `prioritize_alpha` option means the outputted options will prioritize converting characters to characters of the latin alphabet over any others. This option is recommended when natural language is expected.\n```\nfrom confusables import normalize\n\nprint(normalize('\u01a6\u1ecf\ud835\udd4d3\u211b', prioritize_alpha=True))\n# prints ['rov3r', 'rover']\n\nprint(normalize('\u01a6\u1ecf\ud835\udd4d3\u211b', prioritize_alpha=False))\n# prints ['r0v3r', 'r0ver', 'ro\\'v3r', 'ro\\'ver', 'rov3r', 'rover']\n```\n\n## About confusables\n\nThis module is something I put together because I'm interested in the field of language processing. I'm hoping to build out it's functionality, and I'm more than happy to take suggestions!\n\nAdditionally, I think the effectiveness of the module could be greatly improved using some machine learning models, and I'm currently on the hunt for some useful data sets. Please let me know if you know of any!\n\nYou can contact me through any normal Github means, or using my email, `woodgern@gmail.com`\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/woodgern/confusables", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "confusables", "package_url": "https://pypi.org/project/confusables/", "platform": "", "project_url": "https://pypi.org/project/confusables/", "project_urls": { "Homepage": "https://github.com/woodgern/confusables" }, "release_url": "https://pypi.org/project/confusables/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A python package providing functionality for matching words that can be confused for eachother, but contain different characters", "version": "1.0.0" }, "last_serial": 5838983, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "53d8a50195ab543272c05d1490b9b906", "sha256": "4cf3a02fa294013a4803d1233434a27fb9683c680201e858d9a850c71984ed25" }, "downloads": -1, "filename": "confusables-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "53d8a50195ab543272c05d1490b9b906", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7369, "upload_time": "2019-02-16T20:20:28", "url": "https://files.pythonhosted.org/packages/21/00/2e66e7483810e774a86f3ada0c47ad6ec74193a0adc889f224628c3be1a5/confusables-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b7a647cebae904a2eaa0aa4e65cde44c", "sha256": "f2244e0d148fd551272a59bf01985e04a15547d0c9425e53e5a64cc3020af0a1" }, "downloads": -1, "filename": "confusables-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b7a647cebae904a2eaa0aa4e65cde44c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4441, "upload_time": "2019-02-16T20:20:31", "url": "https://files.pythonhosted.org/packages/bf/56/f7fa3b88d302db644de241ed8a9dab1d2405cc420e2935a9ae78f7627778/confusables-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "fa6c080e7c7e243c3c596646e8b890fd", "sha256": "df8a23fbb932772a66da455a8e7f43bcbae528849afe9b553367f41eab499759" }, "downloads": -1, "filename": "confusables-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "fa6c080e7c7e243c3c596646e8b890fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8429, "upload_time": "2019-02-18T06:17:24", "url": "https://files.pythonhosted.org/packages/ed/36/ab949f3bc21defa27d8f446867c6c9bb393917133666f9de90d2ea6125d5/confusables-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e12ae14f3764429662c5d8b436a5c270", "sha256": "aef65d4f62a499cf7573e068615ca26e3f9b7ef5fca671b391b11a23c408f1dd" }, "downloads": -1, "filename": "confusables-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e12ae14f3764429662c5d8b436a5c270", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5489, "upload_time": "2019-02-18T06:17:26", "url": "https://files.pythonhosted.org/packages/b6/a0/85c35e0d92ebb103b823946d2772c18e24cd43e30a30ff6666a7004b0d60/confusables-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "db194a2da97c837d330a1096ad1726c7", "sha256": "1a623dc1ae17b5267d410468e66260a4739d2aaf311e8722f8edf4b384d23492" }, "downloads": -1, "filename": "confusables-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "db194a2da97c837d330a1096ad1726c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8631, "upload_time": "2019-02-18T06:25:29", "url": "https://files.pythonhosted.org/packages/53/9e/a8366de63a50364b9bf49b368f20a57071b0b3681215603990ffa7cedb41/confusables-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6435af77eeade63a5fdb10d3825ac4da", "sha256": "41ec756b24f9812a52e40c07797e6222482fb84552559d3e6775a2af6d1e5f7b" }, "downloads": -1, "filename": "confusables-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6435af77eeade63a5fdb10d3825ac4da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5726, "upload_time": "2019-02-18T06:25:31", "url": "https://files.pythonhosted.org/packages/dc/bd/7ebc175cc8e66d6d38d26cc7ac4beec1b6a208aa91f137e3698b65873c5e/confusables-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5a25e15fa69ea542e1acbacbe3f8443f", "sha256": "d4ae5c14af63ef75cb539d96c9703878ca8c5200c881d7e4ff4596084a01e5d1" }, "downloads": -1, "filename": "confusables-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "5a25e15fa69ea542e1acbacbe3f8443f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8633, "upload_time": "2019-02-18T18:59:54", "url": "https://files.pythonhosted.org/packages/c6/07/c420a4f9cc2a5b7902a6b374bf9f395121f3d3e228eb6b0a116e196a371d/confusables-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "33bb7d15ceea22652d74014c2fd17d45", "sha256": "04e104ac85a1e7682292496129026d5d1678fc96b1f30cac0ecae2fa9c7c5e19" }, "downloads": -1, "filename": "confusables-0.1.2.tar.gz", "has_sig": false, "md5_digest": "33bb7d15ceea22652d74014c2fd17d45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5729, "upload_time": "2019-02-18T18:59:57", "url": "https://files.pythonhosted.org/packages/b1/0e/98d3bb062e04ad8ab0c6e85718c0db7209d64bafaca26f6e557414d2d326/confusables-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8dbe1fb5d691634ad4dfe49b95edaa09", "sha256": "18af8d63d2c03dd8e87372e8431a08dc252806afb8eced3340d6c674d67e5542" }, "downloads": -1, "filename": "confusables-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "8dbe1fb5d691634ad4dfe49b95edaa09", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7969, "upload_time": "2019-02-19T04:05:41", "url": "https://files.pythonhosted.org/packages/03/44/cbe2d99abff44d796bed6ca8f733c72bdf7f14382d93a56dcd76267a2026/confusables-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "22f9b1d56a712f4051028fbc4735e386", "sha256": "c0d3c64753019b9c843ebd2f78023d944958b9bb94312bc5981f7f69694eef87" }, "downloads": -1, "filename": "confusables-0.1.3.tar.gz", "has_sig": false, "md5_digest": "22f9b1d56a712f4051028fbc4735e386", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5689, "upload_time": "2019-02-19T03:57:15", "url": "https://files.pythonhosted.org/packages/44/53/a3a00f67a86374b6ad683c80067ba08314c089046095c6c3fa7954dde19b/confusables-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "25fe6b6224201e24d33cd485074eb13b", "sha256": "8ee33177535566b7937e9d8d377bb146007ed4d07059c83a2a94d3e28c7b9f1f" }, "downloads": -1, "filename": "confusables-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "25fe6b6224201e24d33cd485074eb13b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7969, "upload_time": "2019-02-19T04:11:56", "url": "https://files.pythonhosted.org/packages/c1/92/b63e7e2240e3c4394caf40b41c91d45f522f49fa82823c23a8a46e6a6a00/confusables-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50c34e394b0f41c3ea5d9e9ea6e9c980", "sha256": "6de7f1bd16b35397e66c6bf9f487a63818014d7a0d6d68a1a1912ca25b137aac" }, "downloads": -1, "filename": "confusables-0.1.4.tar.gz", "has_sig": false, "md5_digest": "50c34e394b0f41c3ea5d9e9ea6e9c980", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5691, "upload_time": "2019-02-19T04:11:57", "url": "https://files.pythonhosted.org/packages/0c/13/ab32d6e5d9641891c20384b5339a3ead65b873f9574d0e8222c471a7c2f3/confusables-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "6928cce984e003181e2b8d7306d99abd", "sha256": "2bb23d4e8eeb0bcf96a13ae1c24f4b6e6abd043ea726f76e88faf581912794bc" }, "downloads": -1, "filename": "confusables-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "6928cce984e003181e2b8d7306d99abd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7971, "upload_time": "2019-02-19T04:21:03", "url": "https://files.pythonhosted.org/packages/60/23/a42887f7ccc98cb58e63a148415ea628e97f674357e7a72dfc036d331281/confusables-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0eb49e3f57cc46aee5eed821027a86dd", "sha256": "592d0ed3c5fd6173de02d7368c6b820e201697507c93e02ecc7f55e59e2de306" }, "downloads": -1, "filename": "confusables-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0eb49e3f57cc46aee5eed821027a86dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5692, "upload_time": "2019-02-19T04:21:05", "url": "https://files.pythonhosted.org/packages/c6/89/380b895418d7cfadf659a57de0e47949f8aad0b93e1bf7f6849582609c0a/confusables-0.1.5.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "27c80d82a39bc310e0dfca4937def2f8", "sha256": "99cabdc866d0fd22f0d4d918d8bcd4a1d8cadeec3a5246a9f7fa73c186f7cc62" }, "downloads": -1, "filename": "confusables-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "27c80d82a39bc310e0dfca4937def2f8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8690, "upload_time": "2019-02-24T20:24:30", "url": "https://files.pythonhosted.org/packages/ef/ae/09e20043c199066e8a62dbcc482e7c2d4799ed5a45ec5e1b0619b5263f77/confusables-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9922c097d18c24a1216704aeb28632f0", "sha256": "a6865da2c167b23e9fec88a2273f25f7f2389066c90c7875548f0952e9387dc1" }, "downloads": -1, "filename": "confusables-0.2.0.tar.gz", "has_sig": false, "md5_digest": "9922c097d18c24a1216704aeb28632f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5785, "upload_time": "2019-02-24T20:24:34", "url": "https://files.pythonhosted.org/packages/56/ee/e27878df988b799b3d4ae3559b111d9417344aa2fc1ddaf07808a2761747/confusables-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "b93ef88f4835184f779a3d7bb2b000a8", "sha256": "9eabd293f38e33b1ecf1378407528670d753dcca796a33ca5d757c6616850579" }, "downloads": -1, "filename": "confusables-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b93ef88f4835184f779a3d7bb2b000a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 256960, "upload_time": "2019-07-01T20:44:38", "url": "https://files.pythonhosted.org/packages/91/69/d74f5b8c1493e35d6d3f2eeea62616777e3c46e2d4d78bb7b770baea57b1/confusables-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6611fd29e1ae1de46806c9ef8328ad71", "sha256": "b2042a828698841394f873ffff5615ec7f5791fc518eb3ef60e8cc450912945e" }, "downloads": -1, "filename": "confusables-0.3.0.tar.gz", "has_sig": false, "md5_digest": "6611fd29e1ae1de46806c9ef8328ad71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 250584, "upload_time": "2019-07-01T20:44:40", "url": "https://files.pythonhosted.org/packages/07/c9/045b8f5234adea34a0b73908ed3b4a8ba6b831a237ca38defd6d587eed6d/confusables-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "585a3b22e91ccd09507d7c483b30de66", "sha256": "497859ef5e3083d2cff3e7e9e3964489321eac18ea743e0f7b79edc701dee035" }, "downloads": -1, "filename": "confusables-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "585a3b22e91ccd09507d7c483b30de66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 256957, "upload_time": "2019-09-09T02:44:03", "url": "https://files.pythonhosted.org/packages/eb/76/7ca225d1b09236cc45ad60d100c48f8d69331bdb7f35c05c54020187f807/confusables-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6a78cd7c948e9678ee5c6003372b258f", "sha256": "c8807e45df99be3b90ceddb4230e049038e3db7fa3b402fb959d84f12b9efe2b" }, "downloads": -1, "filename": "confusables-0.4.0.tar.gz", "has_sig": false, "md5_digest": "6a78cd7c948e9678ee5c6003372b258f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 250584, "upload_time": "2019-09-09T02:44:05", "url": "https://files.pythonhosted.org/packages/0a/b7/b2ae503dab7cc1bd3d64bd363f84ba16f50c380e3a1976746b59689693c0/confusables-0.4.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "cf8c27894e80a20033abf511de8784c2", "sha256": "515cb2308211a7af5beb7a736e3a25c1d1cae31d142cd8d58edbfb007276cdf5" }, "downloads": -1, "filename": "confusables-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cf8c27894e80a20033abf511de8784c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 266525, "upload_time": "2019-09-17T01:51:05", "url": "https://files.pythonhosted.org/packages/71/bd/521e14b3478896f89f6d4275dbf69c8767a2c3ac88d11a79a85916689f45/confusables-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49b34d720daf95059668b5e2372133a0", "sha256": "7b97ce19eee89db63b77b316a32ac2da5ffb9140073d105cb4e915d394cc70d9" }, "downloads": -1, "filename": "confusables-1.0.0.tar.gz", "has_sig": false, "md5_digest": "49b34d720daf95059668b5e2372133a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 259606, "upload_time": "2019-09-17T01:51:07", "url": "https://files.pythonhosted.org/packages/65/85/924c61d7489f0f81faecba03ae6e51a3f0d4e9535509bf71a22ab0e4296b/confusables-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cf8c27894e80a20033abf511de8784c2", "sha256": "515cb2308211a7af5beb7a736e3a25c1d1cae31d142cd8d58edbfb007276cdf5" }, "downloads": -1, "filename": "confusables-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "cf8c27894e80a20033abf511de8784c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 266525, "upload_time": "2019-09-17T01:51:05", "url": "https://files.pythonhosted.org/packages/71/bd/521e14b3478896f89f6d4275dbf69c8767a2c3ac88d11a79a85916689f45/confusables-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49b34d720daf95059668b5e2372133a0", "sha256": "7b97ce19eee89db63b77b316a32ac2da5ffb9140073d105cb4e915d394cc70d9" }, "downloads": -1, "filename": "confusables-1.0.0.tar.gz", "has_sig": false, "md5_digest": "49b34d720daf95059668b5e2372133a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 259606, "upload_time": "2019-09-17T01:51:07", "url": "https://files.pythonhosted.org/packages/65/85/924c61d7489f0f81faecba03ae6e51a3f0d4e9535509bf71a22ab0e4296b/confusables-1.0.0.tar.gz" } ] }