pynysiis
=========
.. image:: https://badge.fury.io/py/pynysiis.svg
:target: https://badge.fury.io/py/pynysiis
:alt: NYSIIS Python Package Version
The `pynysiis` package provides a Python implementation of the `New York State Identification and Intelligence System`_ (NYSIIS) phonetic encoding algorithm. NYSIIS encodes names based on pronunciation, which is helpful in name-matching and searching applications.
.. _New York State Identification and Intelligence System: https://en.wikipedia.org/wiki/New_York_State_Identification_and_Intelligence_System
Requirements
-------------
Python 2.7 and later.
Setup
------
You can install this package by using the pip tool and installing:
.. code-block:: bash
$ pip install pynysiis
Or:
.. code-block:: bash
$ easy_install pynysiis
Usage Example
-------------
.. code-block:: python
# Basic Usage
from nysiis import NYSIIS
# Create an instance of the NYSIIS class
nysiis = NYSIIS()
# Encode a string using the NYSIIS instance
name = "Watkins"
coded_name = nysiis.encode(name)
print(coded_name) # Output: "WATCAN"
## Comparing Names
from nysiis import NYSIIS
# Create an instance of the NYSIIS class
nysiis = NYSIIS()
name1 = "John Smith"
name2 = "John Smyth"
coded_name1 = nysiis.encode(name1)
coded_name2 = nysiis.encode(name2)
if coded_name1 == coded_name2:
print("The names are likely to be the same.")
else:
print("The names are different.")
# Output:
# The names are likely to be the same.
## Handling different names
from nysiis import NYSIIS
# Create an instance of the NYSIIS class
nysiis = NYSIIS()
names = ["Watkins", "Robert Johnson", "Samantha Williams", "Olanrewaju Akinyele",
"Obinwanne Obiora", "Abdussalamu Abubakar", "Virat Kohli", "Usman Shah"]
for name in names:
coded_name = nysiis.encode(name)
print(f"Original: {name}, NYSIIS: {coded_name}")
# Output:
# Original: Watkins, NYSIIS: WATCAN
# Original: Robert Johnson, NYSIIS: RABART
# Original: Samantha Williams, NYSIIS: SANANT
# Original: Olanrewaju Akinyele, NYSIIS: OLANRA
# Original: Obinwanne Obiora, NYSIIS: OBAWAN
# Original: Abdussalamu Abubakar, NYSIIS: ABDASA
# Original: Virat Kohli, NYSIIS: VARATC
# Original: Usman Shah, NYSIIS: USNANS
Reference
----------
.. code-block:: bibtex
@inproceedings{Rajkovic2007,
author = {Petar Rajkovic and Dragan Jankovic},
title = {Adaptation and Application of Daitch-Mokotoff Soundex Algorithm on Serbian Names},
booktitle = {XVII Conference on Applied Mathematics},
editors = {D. Herceg and H. Zarin},
pages = {193--204},
year = {2007},
publisher = {Department of Mathematics and Informatics, Novi Sad},
url = {https://jmp.sh/hukNujCG}
}
Additional References
----------------------
+ `Commission Implementing Regulation (EU) 2016/480`_
+ `Commission Implementing Regulation (EU) 2023/2381`_
.. _Commission Implementing Regulation (EU) 2016/480: https://www.legislation.gov.uk/eur/2016/480/contents
.. _Commission Implementing Regulation (EU) 2023/2381: https://eur-lex.europa.eu/eli/reg_impl/2023/2381/oj
License
--------
This project is licensed under the `MIT License`_.
.. _MIT License: https://gist.github.com/0xnu/d11da49c85eeb7272517a9010bbdf1ab
Copyright
----------
Copyright |copy| 2024 `Finbarrs Oketunji`_. All Rights Reserved.
.. |copy| unicode:: 0xA9 .. copyright sign
.. _Finbarrs Oketunji: https://finbarrs.eu/
Raw data
{
"_id": null,
"home_page": "https://finbarrs.eu/",
"name": "pynysiis",
"maintainer": null,
"docs_url": null,
"requires_python": "!=3.10.*,!=3.8.*,!=3.9.*,>=2.7",
"maintainer_email": null,
"keywords": "nysiis, phonetic, encoding, algorithm",
"author": "Finbarrs Oketunji",
"author_email": "f@finbarrs.eu",
"download_url": "https://files.pythonhosted.org/packages/0c/90/eb8020784bf79e77b5cc73ff2755a28bdfe296fe29815e33e8890aecc2dc/pynysiis-1.0.4.tar.gz",
"platform": null,
"description": "pynysiis\n=========\n\n.. image:: https://badge.fury.io/py/pynysiis.svg\n :target: https://badge.fury.io/py/pynysiis\n :alt: NYSIIS Python Package Version\n\n\nThe `pynysiis` package provides a Python implementation of the `New York State Identification and Intelligence System`_ (NYSIIS) phonetic encoding algorithm. NYSIIS encodes names based on pronunciation, which is helpful in name-matching and searching applications.\n\n.. _New York State Identification and Intelligence System: https://en.wikipedia.org/wiki/New_York_State_Identification_and_Intelligence_System\n\n\nRequirements\n-------------\n\nPython 2.7 and later.\n\n\nSetup\n------\n\nYou can install this package by using the pip tool and installing:\n\n.. code-block:: bash\n\n\t$ pip install pynysiis\n\nOr:\n\n.. code-block:: bash\n\n\t$ easy_install pynysiis\n\n\nUsage Example\n-------------\n\n.. code-block:: python\n\n # Basic Usage\n from nysiis import NYSIIS\n\n # Create an instance of the NYSIIS class\n nysiis = NYSIIS()\n\n # Encode a string using the NYSIIS instance\n name = \"Watkins\"\n coded_name = nysiis.encode(name)\n print(coded_name) # Output: \"WATCAN\"\n\n\n ## Comparing Names\n from nysiis import NYSIIS\n\n # Create an instance of the NYSIIS class\n nysiis = NYSIIS()\n\n name1 = \"John Smith\"\n name2 = \"John Smyth\"\n\n coded_name1 = nysiis.encode(name1)\n coded_name2 = nysiis.encode(name2)\n\n if coded_name1 == coded_name2:\n print(\"The names are likely to be the same.\")\n else:\n print(\"The names are different.\")\n\n # Output:\n # The names are likely to be the same.\n\n\n ## Handling different names\n from nysiis import NYSIIS\n\n # Create an instance of the NYSIIS class\n nysiis = NYSIIS()\n\n names = [\"Watkins\", \"Robert Johnson\", \"Samantha Williams\", \"Olanrewaju Akinyele\",\n \"Obinwanne Obiora\", \"Abdussalamu Abubakar\", \"Virat Kohli\", \"Usman Shah\"]\n\n for name in names:\n coded_name = nysiis.encode(name)\n print(f\"Original: {name}, NYSIIS: {coded_name}\")\n\n # Output:\n # Original: Watkins, NYSIIS: WATCAN\n # Original: Robert Johnson, NYSIIS: RABART\n # Original: Samantha Williams, NYSIIS: SANANT\n # Original: Olanrewaju Akinyele, NYSIIS: OLANRA\n # Original: Obinwanne Obiora, NYSIIS: OBAWAN\n # Original: Abdussalamu Abubakar, NYSIIS: ABDASA\n # Original: Virat Kohli, NYSIIS: VARATC\n # Original: Usman Shah, NYSIIS: USNANS\n\n\nReference\n----------\n\n.. code-block:: bibtex\n\n @inproceedings{Rajkovic2007,\n author = {Petar Rajkovic and Dragan Jankovic},\n title = {Adaptation and Application of Daitch-Mokotoff Soundex Algorithm on Serbian Names},\n booktitle = {XVII Conference on Applied Mathematics},\n editors = {D. Herceg and H. Zarin},\n pages = {193--204},\n year = {2007},\n publisher = {Department of Mathematics and Informatics, Novi Sad},\n url = {https://jmp.sh/hukNujCG}\n }\n\n\nAdditional References\n----------------------\n\n+ `Commission Implementing Regulation (EU) 2016/480`_\n+ `Commission Implementing Regulation (EU) 2023/2381`_\n\n.. _Commission Implementing Regulation (EU) 2016/480: https://www.legislation.gov.uk/eur/2016/480/contents\n.. _Commission Implementing Regulation (EU) 2023/2381: https://eur-lex.europa.eu/eli/reg_impl/2023/2381/oj\n\n\nLicense\n--------\n\nThis project is licensed under the `MIT License`_. \n\n.. _MIT License: https://gist.github.com/0xnu/d11da49c85eeb7272517a9010bbdf1ab\n\n\nCopyright\n----------\n\nCopyright |copy| 2024 `Finbarrs Oketunji`_. All Rights Reserved.\n\n.. |copy| unicode:: 0xA9 .. copyright sign\n.. _Finbarrs Oketunji: https://finbarrs.eu/\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "NYSIIS phonetic encoding algorithm.",
"version": "1.0.4",
"project_urls": {
"Bug Tracker": "https://github.com/0xnu/nysiis/issues",
"Changes": "https://github.com/0xnu/nysiis/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/0xnu/nysiis/blob/main/README.md",
"Homepage": "https://finbarrs.eu/",
"Source Code": "https://github.com/0xnu/nysiis"
},
"split_keywords": [
"nysiis",
" phonetic",
" encoding",
" algorithm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c96fe9822fde82781483ab4cf0c89324e941a0340cfbd3053ed979aa74449178",
"md5": "2d87405f171d9fd78715263c736aa6b8",
"sha256": "0c19a350bfe585e5a528fa148b1adab75f51d7e97c76ce8ad41b6bc95b5e018c"
},
"downloads": -1,
"filename": "pynysiis-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2d87405f171d9fd78715263c736aa6b8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "!=3.10.*,!=3.8.*,!=3.9.*,>=2.7",
"size": 14484,
"upload_time": "2024-04-20T20:56:27",
"upload_time_iso_8601": "2024-04-20T20:56:27.502954Z",
"url": "https://files.pythonhosted.org/packages/c9/6f/e9822fde82781483ab4cf0c89324e941a0340cfbd3053ed979aa74449178/pynysiis-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0c90eb8020784bf79e77b5cc73ff2755a28bdfe296fe29815e33e8890aecc2dc",
"md5": "4bb47bb9d5a8ca670ec634b029fde0a2",
"sha256": "8b2cc805aba24defd972d376bd344f6e6c2684a41f188c278bd48cabc93677dd"
},
"downloads": -1,
"filename": "pynysiis-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "4bb47bb9d5a8ca670ec634b029fde0a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "!=3.10.*,!=3.8.*,!=3.9.*,>=2.7",
"size": 16026,
"upload_time": "2024-04-20T20:56:29",
"upload_time_iso_8601": "2024-04-20T20:56:29.328868Z",
"url": "https://files.pythonhosted.org/packages/0c/90/eb8020784bf79e77b5cc73ff2755a28bdfe296fe29815e33e8890aecc2dc/pynysiis-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-20 20:56:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "0xnu",
"github_project": "nysiis",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pynysiis"
}