From 4c8c771b84c9b60b3c3ac2fbefcf792c9ca47e32 Mon Sep 17 00:00:00 2001 From: Jordan <37647414+linuxgoose@users.noreply.github.com> Date: Thu, 27 Mar 2025 22:52:06 +0000 Subject: [PATCH] Rebranding --- LICENSE.rst => LICENSE.md | 0 README.md | 18 +++---- README.rst | 54 ------------------- .../__init__.py | 0 .../distance_metrics/__init__.py | 0 .../distance_metrics/hamming.py | 0 .../distance_metrics/levenshtein.py | 0 .../exceptions.py | 0 .../phonetics/__init__.py | 0 .../phonetics/fuzzy_soundex.py | 0 .../phonetics/lein.py | 0 .../phonetics/metaphone.py | 0 .../phonetics/mra.py | 0 .../phonetics/phonetic_algorithm.py | 0 .../phonetics/refined_soundex.py | 0 .../phonetics/soundex.py | 0 {pyphonetics => linguistics_robin}/utils.py | 0 pyproject.toml | 8 +-- tests/test_corner_cases.py | 4 +- tests/test_distances.py | 2 +- tests/test_phonetics.py | 2 +- tests/test_utils.py | 2 +- 22 files changed, 16 insertions(+), 74 deletions(-) rename LICENSE.rst => LICENSE.md (100%) delete mode 100644 README.rst rename {pyphonetics => linguistics_robin}/__init__.py (100%) rename {pyphonetics => linguistics_robin}/distance_metrics/__init__.py (100%) rename {pyphonetics => linguistics_robin}/distance_metrics/hamming.py (100%) rename {pyphonetics => linguistics_robin}/distance_metrics/levenshtein.py (100%) rename {pyphonetics => linguistics_robin}/exceptions.py (100%) rename {pyphonetics => linguistics_robin}/phonetics/__init__.py (100%) rename {pyphonetics => linguistics_robin}/phonetics/fuzzy_soundex.py (100%) rename {pyphonetics => linguistics_robin}/phonetics/lein.py (100%) rename {pyphonetics => linguistics_robin}/phonetics/metaphone.py (100%) rename {pyphonetics => linguistics_robin}/phonetics/mra.py (100%) rename {pyphonetics => linguistics_robin}/phonetics/phonetic_algorithm.py (100%) rename {pyphonetics => linguistics_robin}/phonetics/refined_soundex.py (100%) rename {pyphonetics => linguistics_robin}/phonetics/soundex.py (100%) rename {pyphonetics => linguistics_robin}/utils.py (100%) diff --git a/LICENSE.rst b/LICENSE.md similarity index 100% rename from LICENSE.rst rename to LICENSE.md diff --git a/README.md b/README.md index 9364c3112dbcb89f13e5e50eaea0ec040246928d..1efecf2f9d52b19fa8db4d93d315841782182458 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Pyphonetics +# Linguistics Robin -Pyphonetics is a Python 3 library for phonetic algorithms. Right now, the following algorithms are implemented and supported: +Linguistics Robin is a Python linguistics collection that stemmed from a phonetics only library (which is why there is currently more phonetic tooling). Right now, the following algorithms are implemented and supported: * Soundex * Metaphone @@ -18,13 +18,13 @@ More will be added in the future. ## Instalation -The module is available in PyPI, just use `pip install pyphonetics`. +The module is available in PyPI, just use `pip install linguistics-robin`. ## Usage ```python ->>> from pyphonetics import Soundex +>>> from linguistics_robin import Soundex >>> soundex = Soundex() >>> soundex.phonetics('Rupert') 'R163' @@ -37,7 +37,7 @@ True The same API applies to every algorithm, e.g: ```python ->>> from pyphonetics import Metaphone +>>> from linguistics_robin import Metaphone >>> metaphone = Metaphone() >>> metaphone.phonetics('discrimination') 'TSKRMNXN' @@ -46,14 +46,10 @@ The same API applies to every algorithm, e.g: You can also use the `distance(word1, word2, metric='levenshtein')` method to find the distance between 2 phonetic representations. ```python ->>> from pyphonetics import RefinedSoundex +>>> from linguistics_robin import RefinedSoundex >>> rs = RefinedSoundex() >>> rs.distance('Rupert', 'Robert') 0 >>> rs.distance('assign', 'assist', metric='hamming') 2 -``` - -## Credits - -The module was largely based on the implementation of phonetic algorithms found in the [Talisman.js](https://github.com/Yomguithereal/talisman) Node NLP library. \ No newline at end of file +``` \ No newline at end of file diff --git a/README.rst b/README.rst deleted file mode 100644 index 06e1c9d25cb2f5fbf2e081c5df67d00c81265998..0000000000000000000000000000000000000000 --- a/README.rst +++ /dev/null @@ -1,54 +0,0 @@ -=========== -Pyphonetics -=========== - -Pyphonetics is a Python 3 library for phonetic algorithms. Right now, the following algorithms are implemented and supported: - - * Soundex - * Metaphone - * Refined Soundex - * Fuzzy Soundex - * Lein - * Matching Rating Approach - -More will be added in the future. - -Instalation -*********** - -The module is available in PyPI, just use `pip install pyphonetics`. - - -Usage -***** - - >>> from pyphonetics import Soundex - >>> soundex = Soundex() - >>> soundex.phonetics('Rupert') - 'R163' - >>> soundex.phonetics('Robert') - 'R163' - >>> soundex.sounds_like('Robert', 'Rupert') - True - - -The same API applies to every algorithm, e.g: - - >>> from pyphonetics import Metaphone - >>> metaphone = Metaphone() - >>> metaphone.phonetics('discrimination') - 'TSKRMNXN' - -You can also use the `distance(word1, word2, metric='levenshtein')` method to find the distance between 2 phonetic representations. - - >>> from pyphonetics import RefinedSoundex - >>> rs = RefinedSoundex() - >>> rs.distance('Rupert', 'Robert') - 0 - >>> rs.distance('assign', 'assist', metric='hamming') - 2 - -Credits -======= - -The module was largely based on the implementation of phonetic algorithms found in the Talisman.js (https://github.com/Yomguithereal/talisman) Node NLP library. \ No newline at end of file diff --git a/pyphonetics/__init__.py b/linguistics_robin/__init__.py similarity index 100% rename from pyphonetics/__init__.py rename to linguistics_robin/__init__.py diff --git a/pyphonetics/distance_metrics/__init__.py b/linguistics_robin/distance_metrics/__init__.py similarity index 100% rename from pyphonetics/distance_metrics/__init__.py rename to linguistics_robin/distance_metrics/__init__.py diff --git a/pyphonetics/distance_metrics/hamming.py b/linguistics_robin/distance_metrics/hamming.py similarity index 100% rename from pyphonetics/distance_metrics/hamming.py rename to linguistics_robin/distance_metrics/hamming.py diff --git a/pyphonetics/distance_metrics/levenshtein.py b/linguistics_robin/distance_metrics/levenshtein.py similarity index 100% rename from pyphonetics/distance_metrics/levenshtein.py rename to linguistics_robin/distance_metrics/levenshtein.py diff --git a/pyphonetics/exceptions.py b/linguistics_robin/exceptions.py similarity index 100% rename from pyphonetics/exceptions.py rename to linguistics_robin/exceptions.py diff --git a/pyphonetics/phonetics/__init__.py b/linguistics_robin/phonetics/__init__.py similarity index 100% rename from pyphonetics/phonetics/__init__.py rename to linguistics_robin/phonetics/__init__.py diff --git a/pyphonetics/phonetics/fuzzy_soundex.py b/linguistics_robin/phonetics/fuzzy_soundex.py similarity index 100% rename from pyphonetics/phonetics/fuzzy_soundex.py rename to linguistics_robin/phonetics/fuzzy_soundex.py diff --git a/pyphonetics/phonetics/lein.py b/linguistics_robin/phonetics/lein.py similarity index 100% rename from pyphonetics/phonetics/lein.py rename to linguistics_robin/phonetics/lein.py diff --git a/pyphonetics/phonetics/metaphone.py b/linguistics_robin/phonetics/metaphone.py similarity index 100% rename from pyphonetics/phonetics/metaphone.py rename to linguistics_robin/phonetics/metaphone.py diff --git a/pyphonetics/phonetics/mra.py b/linguistics_robin/phonetics/mra.py similarity index 100% rename from pyphonetics/phonetics/mra.py rename to linguistics_robin/phonetics/mra.py diff --git a/pyphonetics/phonetics/phonetic_algorithm.py b/linguistics_robin/phonetics/phonetic_algorithm.py similarity index 100% rename from pyphonetics/phonetics/phonetic_algorithm.py rename to linguistics_robin/phonetics/phonetic_algorithm.py diff --git a/pyphonetics/phonetics/refined_soundex.py b/linguistics_robin/phonetics/refined_soundex.py similarity index 100% rename from pyphonetics/phonetics/refined_soundex.py rename to linguistics_robin/phonetics/refined_soundex.py diff --git a/pyphonetics/phonetics/soundex.py b/linguistics_robin/phonetics/soundex.py similarity index 100% rename from pyphonetics/phonetics/soundex.py rename to linguistics_robin/phonetics/soundex.py diff --git a/pyphonetics/utils.py b/linguistics_robin/utils.py similarity index 100% rename from pyphonetics/utils.py rename to linguistics_robin/utils.py diff --git a/pyproject.toml b/pyproject.toml index 832e6be277b05bcc6abedda639a3136252e9213d..7d901428fee3246ffdbd0d34158f9f429df88763 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,10 +7,10 @@ requires = [ build-backend = "flit_core.buildapi" [tool.flit.metadata] -module = "pyphonetics" -author = "Lilykos" -author-email = "ilias.koutsakis@gmail.com" -home-page = "https://github.com/Lilykos/pyphonetics" +module = "linguistics_robin" +author = "Jordan Robinson" +author-email = "hello@jordanrobinson.org" +home-page = "https://github.com/linuxgoose/linguistics-robin" description-file="README.rst" classifiers = [ "License :: OSI Approved :: MIT License", diff --git a/tests/test_corner_cases.py b/tests/test_corner_cases.py index 6eb9ca95174fa8f25d1d02f1205111c189ffbc34..092deff60a12a39ec6977b31dad03449b971ddef 100644 --- a/tests/test_corner_cases.py +++ b/tests/test_corner_cases.py @@ -1,6 +1,6 @@ import pytest -from pyphonetics import Soundex, RefinedSoundex, FuzzySoundex -from pyphonetics.exceptions import EmptyStringError +from linguistics_robin import Soundex, RefinedSoundex, FuzzySoundex +from linguistics_robin.exceptions import EmptyStringError def test_soundex(): diff --git a/tests/test_distances.py b/tests/test_distances.py index 9d67ac1be2b1bd5206c97ce933738c29e03a7945..d1d90590d1965e8aee724222c1100d6a6e5196af 100644 --- a/tests/test_distances.py +++ b/tests/test_distances.py @@ -1,4 +1,4 @@ -from pyphonetics.distance_metrics import levenshtein_distance, hamming_distance +from linguistics_robin.distance_metrics import levenshtein_distance, hamming_distance def test_levenshtein(): diff --git a/tests/test_phonetics.py b/tests/test_phonetics.py index 834d3ed1fbcf615be3331889c9dcdd14040a8119..802a0c98ac9350c83abe66edbc4ac9be615df456 100644 --- a/tests/test_phonetics.py +++ b/tests/test_phonetics.py @@ -1,4 +1,4 @@ -from pyphonetics import Metaphone, Soundex, MatchingRatingApproach,\ +from linguistics_robin import Metaphone, Soundex, MatchingRatingApproach,\ FuzzySoundex, Lein, RefinedSoundex diff --git a/tests/test_utils.py b/tests/test_utils.py index 13704cb53957d4f539ef6a5ece95ceb707b5a9ef..f5243ad5876fc0f55c9425962dbdf45d1150d7be 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,4 +1,4 @@ -from pyphonetics.utils import squeeze, translation +from linguistics_robin.utils import squeeze, translation def test_squeeze():