Question: I'm looking for a gem or project that would let me identify that two names are the same person. For example

> 
> `J.R. Smith == John R. Smith == John Smith == John Roy Smith == Johnny Smith`
> 
> 
> 

I think you get the idea. I know nothing is going to be 100% accurate but I'd like to get something that at least handles the majority of cases. I know that last one is probably going to need a database of nicknames.

Answer: 
This is a little late (and a shameless plug to boot), but for what it's worth, I wrote a [human name parser](https://rubygems.org/gems/namae) during a GSoC project, which you can install with `gem install namae`. It does not detect your duplicates reliably obviously, but it helps you with such kind of tasks.

For instance, you can parse the names in your example and use a display form using initials to detect names whose initials are identical, and so on and so forth:

```
names = Namae.parse('J.R. Smith and John R. Smith and John Smith and John Roy Smith and Johnny Smith ')
names.map { |n| [n.given, n.family] }
#=> => [["J.R.", "Smith"], ["John R.", "Smith"], ["John", "Smith"], ["John Roy", "Smith"], ["Johnny", "Smith"]]
names.map { |n| n.initials expand: true }
#=> ["J.R. Smith", "J.R. Smith", "J. Smith", "J.R. Smith", "J. Smith"]

```
I don't think such a library exists.

I don't mean to offend, but this problem seems like it arises from poor design. Maybe if you post more details about the general problem you are trying to solve, people can suggest a better way.