{ "info": { "author": "Matt McGrattan", "author_email": "matt.mcgrattan@digirati.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# personalnames\n\n[https://github.com/digirati-co-uk/personalnames](https://github.com/digirati-co-uk/personalnames)\n\nLightweight Python functions for generating different formats for personal names\n\nFor example, when parsing text (from OCR or manual transcription) for named individuals, it can be useful to know all of the forms in which a name might appear.\n\n\"Dr Martin Luther King, Jr.\"\n\nfor example, might appear as \"Dr. M. L. King, Jr.\" or as \"King, Dr. Martin L., Jr.\".\n\nThis code will generate name variants by parsing a name (as a string), identifying prexifes and suffixes, and returning possible variants.\n\n## Requirements\n\nPython 3.x\n\nRequired python packages are listed in `requirements.txt`.\n\n## Installation\n\n`pip install personalnames`\n\n## Usage\n\n```python\nfrom personalnames import names\n\nname = \"Dr. Martin Luther King, Jr.\"\n\nformats = names.name_initials(\n name=name, name_formats=[\"firstnamelastname\", \"lastnamefirstname\"]\n)\n\nassert sorted(formats) == sorted(\n [\n \"King, Dr. M. L., Jr.\",\n \"Dr. Martin Luther King\",\n \"Dr. M. Luther King, Jr.\",\n \"King, M. L.\",\n \"King, M. L., Jr.\",\n \"Dr. Martin L. King\",\n \"Martin Luther King\",\n \"King, Dr. Martin L.\",\n \"M. Luther King, Jr.\",\n \"Dr. Martin Luther King, Jr.\",\n \"King, Dr. Martin L., Jr.\",\n \"Dr. M. L. King, Jr.\",\n \"King, Martin Luther\",\n \"King, Dr. M. L.\",\n \"King, M. Luther, Jr.\",\n \"King, Martin Luther, Jr.\",\n \"Dr. M. Luther King\",\n \"Dr. M. L. King\",\n \"Martin Luther King, Jr.\",\n \"King, Dr. M. Luther\",\n \"Martin L. King, Jr.\",\n \"M. Luther King\",\n \"King, Dr. Martin Luther\",\n \"M. L. King, Jr.\",\n \"Dr. Martin L. King, Jr.\",\n \"Martin L. King\",\n \"King, Martin L., Jr.\",\n \"King, Dr. Martin Luther, Jr.\",\n \"M. L. King\",\n \"King, M. Luther\",\n \"King, Dr. M. Luther, Jr.\",\n \"King, Martin L.\",\n ]\n)\n```\n\nThere are two possible formats for name order: `firstnamelastname` and `lastnamefirstname`.\n\nAdditional Options:\n\n`non_ws=True`\n\nwill return the same list but with additional versions that have no whitespace.\n\n```python\nfrom personalnames import names\n\nname = \"Dr. Martin Luther King, Jr.\"\n\nformats = names.name_initials(\n name=name, name_formats=[\"firstnamelastname\"], non_ws=True\n)\n\n\nassert sorted(formats) == sorted(\n [\n \"Dr. M. L. King, Jr.\",\n \"Martin L. King\",\n \"M.LutherKing,Jr.\",\n \"Dr.MartinL.King\",\n \"M. Luther King\",\n \"Dr.MartinL.King,Jr.\",\n \"Dr. Martin Luther King, Jr.\",\n \"Dr.M.L.King,Jr.\",\n \"Martin Luther King, Jr.\",\n \"Dr.M.LutherKing\",\n \"Dr. Martin Luther King\",\n \"MartinL.King\",\n \"Dr. M. Luther King, Jr.\",\n \"Dr. M. L. King\",\n \"MartinLutherKing,Jr.\",\n \"M. L. King, Jr.\",\n \"M. Luther King, Jr.\",\n \"M.L.King\",\n \"Dr.M.LutherKing,Jr.\",\n \"Martin Luther King\",\n \"MartinLutherKing\",\n \"Dr.M.L.King\",\n \"MartinL.King,Jr.\",\n \"M. L. King\",\n \"Dr. Martin L. King, Jr.\",\n \"Martin L. King, Jr.\",\n \"Dr.MartinLutherKing,Jr.\",\n \"Dr. M. Luther King\",\n \"Dr.MartinLutherKing\",\n \"Dr. Martin L. King\",\n \"M.L.King,Jr.\",\n \"M.LutherKing\",\n ]\n)\n```\n\n# License\n\nMIT License\n\nCopyright Digirati Ltd. (c) 2018 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n# Contribution Guidelines\n\nPersonalnames uses Python 3.x. \n\nFeel free to raise Github issues. \n\nIf you find an issue you are interested in fixing you can:\n\n\n* Fork the repository\n* Clone the repository to your local machine\n* Create a new branch for your fix using `git checkout -b branch-name-here`.\n* Fix the issue.\n* Commit and push the code to your remote repository.\n* Submit a pull request to the `personalnames` repository, with a description of your fix and the issue number.\n* The PR will be reviewed by the maintainer [https://github.com/mattmcgrattan](https://github.com/mattmcgrattan) and either merge the PR or response with comments.\n\nThanks!\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/digirati-co-uk/personalnames", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "personalnames", "package_url": "https://pypi.org/project/personalnames/", "platform": "", "project_url": "https://pypi.org/project/personalnames/", "project_urls": { "Homepage": "https://github.com/digirati-co-uk/personalnames" }, "release_url": "https://pypi.org/project/personalnames/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "Generate variant forms for personal names.", "version": "0.0.3" }, "last_serial": 4237392, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1b1f34fb95b5b2439e7eab7ab0b08e35", "sha256": "1acd1606f06a10b49bbc52f3cd915f54f277f8918ea88ba18071c28f34913d2b" }, "downloads": -1, "filename": "personalnames-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1b1f34fb95b5b2439e7eab7ab0b08e35", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6746, "upload_time": "2018-08-17T13:30:09", "url": "https://files.pythonhosted.org/packages/e4/f5/aff6b428d30af31534b81119c637719939e4c86ad79fd5f654f844c8e894/personalnames-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2dacfbcae37c634257c1a0075857afa7", "sha256": "8884c0f2b722a650b25ff29f6c0efd642ba2a20d83c9f0f6cc41a88ec0e0a3c4" }, "downloads": -1, "filename": "personalnames-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2dacfbcae37c634257c1a0075857afa7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6212, "upload_time": "2018-08-17T13:30:12", "url": "https://files.pythonhosted.org/packages/0e/31/7cbad377b9bd525486e71bc5b57c150200de0d41826c20825fad34329102/personalnames-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "ba6090bdc7c7ef783d86c2a0bb8560c2", "sha256": "427575c9355b4fd45f8c8c1c1dab719f3aead02d79334bee649e6746bbf41654" }, "downloads": -1, "filename": "personalnames-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ba6090bdc7c7ef783d86c2a0bb8560c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6785, "upload_time": "2018-08-17T13:30:11", "url": "https://files.pythonhosted.org/packages/89/52/e1c8844251d49110015aa15fc5db00fd7f4d84dcb4ac98f84745260777a2/personalnames-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e16872374b8ef69541e0d8a256dd03b7", "sha256": "d7daac0d3a096919be69e384602b37c4705c7b26069a46b8214d41923265fec3" }, "downloads": -1, "filename": "personalnames-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e16872374b8ef69541e0d8a256dd03b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6261, "upload_time": "2018-08-17T13:30:13", "url": "https://files.pythonhosted.org/packages/86/37/6b81dc5adb207f83aceb8f3f9652c2ad9136eded6c36f9ea233a77a8804e/personalnames-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a4f0618ac25bafef186dcb74a425e956", "sha256": "f1cb7acd8e6fae06e71c13874bc70c2232315cdc19d16443593e76ca0da6512c" }, "downloads": -1, "filename": "personalnames-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a4f0618ac25bafef186dcb74a425e956", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6271, "upload_time": "2018-09-04T12:17:27", "url": "https://files.pythonhosted.org/packages/c9/6f/d6056b435afdf7e3eaf025dca80cea9eb1b7f9dcf10fed7da7d36542aa13/personalnames-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4f0618ac25bafef186dcb74a425e956", "sha256": "f1cb7acd8e6fae06e71c13874bc70c2232315cdc19d16443593e76ca0da6512c" }, "downloads": -1, "filename": "personalnames-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a4f0618ac25bafef186dcb74a425e956", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6271, "upload_time": "2018-09-04T12:17:27", "url": "https://files.pythonhosted.org/packages/c9/6f/d6056b435afdf7e3eaf025dca80cea9eb1b7f9dcf10fed7da7d36542aa13/personalnames-0.0.3.tar.gz" } ] }