Top AI Repos β open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
π Fuzzy Name Matching with Machine Learning
| Date | Stars |
|---|---|
| 2026-07-31 | 268 |
| 2026-08-02 | 268 |
| 2026-08-06 | 268 |
Today
β stars today
This week
β stars this week
This month
β stars this month
Momentum
0.0
growth rate 0.00%/day
<p align="center">
<img src="https://github.com/Christopher-Thornton/hmni/blob/master/nametag.png?raw=true" alt="logo" />
</p>
# HMNI



[](https://hmni.readthedocs.io/en/latest/?badge=latest)


Fuzzy name matching with machine learning. Perform common fuzzy name matching tasks including similarity scoring, record linkage, deduplication and normalization.
HMNI is trained on an internationally-transliterated Latin firstname dataset, where precision is afforded priority.
| Model | Accuracy | Precision | Recall | F1-Score
|-------------|-----------|-----------|-----------|-----------
| HMNI-Latin | 0.9393 | 0.9255 | 0.7548 | 0.8315
For an introduction to the methodology and research behind HMNI, please refer to my [blog post](https://towardsdatascience.com/fuzzy-name-matching-with-machine-learning-f09895dce7b4).
## Requirements
### Python 3.5β3.8
- tensorflow
- scikit-learn
- fuzzywuzzy
- abydos
- unidecode
## QUICK USAGE GUIDE
## Installation
Using PIP via PyPI
```bash
pip install hmni
```
#### Initialize a MatcherΒ Object
```python
import hmni
matcher = hmni.Matcher(model='latin')
```
#### Single Pair Similarity
```python
matcher.similarity('Alan', 'Al')
# 0.6838303319889133
matcher.similarity('Alan', 'Al', prob=False)
# 1
matcher.similarity('Alan Turing', 'Al Turing', surname_first=False)
# 0.6838303319889133
```
#### Record Linkage
```python
import pandas as pd
df1 = pd.DataFrame({'name': ['Al', 'Mark', 'James', 'Harold']})
df2 = pd.DataFrame({'name': ['Mark', 'Alan', 'James', 'Harold']})
merged = matcher.fuzzymerge(df1, df2, how='left', on='name')
```
#### Name Deduplication and Normalization
```python
names_list = ['Alan', 'Al', 'Al', 'James']
matcher.dedupe(names_list, keep='longest')
# ['Alan', 'James']
matcher.dedupe(names_list, keep='frequent')
# ['Al, 'James']
matcher.dedupe(names_list, keep='longest', replace=True)
# ['Alan, 'Alan', 'Alan', 'James']
```
## Matcher Parameters
> **hmni.Matcher**(model='latin', prefilter=True, allow_alt_surname=True, allow_initials=True, allow_missing_components=True)
* **model** *(str)* -- HMNI statistical model (latin by default)
* **prefilter** *(bool)* -- Should the matcher prefilter unlikely candidates (True by default)
* **allow_alt_surname** *(bool)* -- Should the matcher consider phonetic matching surnames *e.g. Smith, Schmidt* (True by default)
* **allow_initials** *(bool)* -- Should the matcher consider names with initials (True by default)
* **allow_missing_components** *(bool)* -- Should the matcher consider names with missing components (True by default)
## Matcher Methods
> **similarity**(name_a, name_b, prob=True, surname_first=False)
* **name_a** *(str)* -- First name for comparison
* **name_b** *(str)* -- Second name for comparison
* **prob** *(bool)* -- If True return a predicted probability, else binary class label
* **threshold** *(float)* -- Prediction probability threshold for positive match (0.5 by default)
* **surname_first** *(bool)* -- If name strings start with surname (False by default)
> **fuzzymerge**(df1, df2, how='inner', on=None, left_on=None, right_on=None, indicator=False, limit=1, threshold=0.5, allow_exact_matches=True, surname_first=False)
* **df1** *(pandas DataFrame or named Series)* -- First/Left object to merge with
* **df2** *(pandas DataFrame or named Series)* -- Second/Right object to merge with
* **how** *(str)* -- Type of merge to be performed
* `inner` (default): Use intersection of keys froExcerpt of 6,676 characters
Read on GitHubWould you bet a product on this? Bounded 0β100 and slow moving.
matched fp:43be282871e93092, topic:nlp, topic:natural-language-processing