Metadata-Version: 2.4
Name: linguistics_robin
Version: 0.5.5
Summary: A Python 3 linguistics collection library.
Home-page: https://github.com/linuxgoose/linguistics-robin
Author: Jordan Robinson
Author-email: hello@jordanrobinson.org
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE.md
Requires-Dist: unidecode >=1,<2

# Linguistics Robin

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
 * Refined Soundex
 * Fuzzy Soundex
 * Lein
 * Matching Rating Approach
 * New York State Identification and Intelligence System (NYSIIS)
 
In addition, the following distance metrics:

 * Hamming
 * Levenshtein

More will be added in the future.

## Installation (in progress)

The module is available in PyPI, just use `pip install linguistics_robin`.


## Usage

```python
>>> from linguistics_robin 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:

```python
>>> from linguistics_robin 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.

```python
>>> from linguistics_robin import RefinedSoundex
>>> rs = RefinedSoundex()
>>> rs.distance('Rupert', 'Robert')
0
>>> rs.distance('assign', 'assist', metric='hamming')
2
```
