How do I compare the similarity of person names using a metric?
<p>I am particularly working on a function to allow the misspelled and aliases of  <strong>person names</strong>.
I have done some research &amp; found there are quite a number of algorithms for <a href="https://en.wikipedia.org/wiki/String_metric" rel="noreferrer">String metric</a> and phonetic libraries too.</p>

<p>I have tried some and of all those <a href="https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance" rel="noreferrer">Jaro Winkler</a> gives some good results as below.</p>

<pre><code>compareStrings("elon musk","elon musk"))    --&gt; 1.0 
compareStrings("elonmusk","elon musk"))     --&gt; 0.98
compareStrings("elon mush","elon musk"))    --&gt; 0.99
compareStrings("eln msuk","elon musk"))     --&gt; 0.94
compareStrings("elon","elon musk"))         --&gt; 0.89
compareStrings("musk","elon musk"))         --&gt; 0.0  //This is bad, but can fix that.
compareStrings("mr elon musk","elon musk")) --&gt; 0.81
</code></pre>

<p>The above is the implementation from <strong>Apache commons Library</strong>.I wanted to know if there is any <strong>better implementation</strong> which serves the purpose better. Any help is appreciated. </p>

<p>Edit: @newuserua_ext @Trasher Thanks, I appreciate for your time. I have gone through all StackExchange Q&amp;A related to this. And posted this question focusing on person names.</p>