We hate terrorism. There is not enough tolerance and love and peace and all the other stuff that makes terrorists get nasty – that’s for sure. But how does killing innocent people help?
For a medium-size IT company as we are, there seems to be no way, how to help fighting terrorism. But we are different. We see things others overlook. We are highly motivated. We are frigging smart. We have a damn mission.
Hereby, in the following twenty-or-so lines, we will prove the world, that Barack Obama IS NOT Osama bin Laden by any means! We will reveal the secret connection between English literature and English breakfast. We will present some shocking facts about Justin Bieber (we hilighted this solely for higher Google ranks, not as if we enjoyed his music). We will prove much more about the secret connections behind the hood! (If you still don’t see the connection to my previous post, stay cool. This is a follow-up post indeed.).
OK, so now, as I have your interest, let’s focus on the list of celebrities we will test against name silimarity (with an algorithm explained in the previous article). Look at the list of the names and give an educated guess, which pair will look the most similar for the algorithm we designed previously. Let’s go:
- Barak Obana vs Barack Obama
- Barack Obama vs Osama bin Laden
- Donald Trump vs Donald Duck
- Andi Roddick vs The flying spagetti monster
- Bill Cosby vs Ted Mosby (the big battle for the most awesome TV character!)
- James Joyce vs Jam n Juice
Got the guesses?! Fantastic! Now we will give you a chance to check your intuition against a supercool algorithm of ours called levenstheinX. This algorithm is intended to take a pair of names and return a number from zero to one. The bigger this number is, the more similar the names are. The listing of the algorithm can be found at the very end of this blog post.
Without further ado, let’s reveal the top 3 similar pairs of names! Drumrolls please….
3. James Joyce vs Jam n Juice with a score of 0.636 that means a 63% similarity!
Congratulations. Let’s see who placed second…
2. It is Donald Trump vs Donald Duck scoring 0.667! Man, get him to know Scrooge the Duck!
And the winner of the contest for the most similar names iiiiiis…..
1. Barak Obana vs. Barack Obama with only 17% uncertainty of the equality (score was 0.83).
While the winners enjoy their fame, we have one more cool announcement to make. We are ABSOLUTELY sure, that Barack Obama is nothing like the nasty terrorist Osama Bin Laden with their test scoring a straight zero (and this is also it for our contribution to the war against the terrorism). Awesome.
PS: What is the similarity score you would guess for the following: Justin Bieber vs. Just in beaver? (Find the answer at the very bottom of the page).
Hey techies! Bet you are damn curious about the supercool algorithm that produced these outputs. Here it goes, feel free to study it, feel free to use it, it is all yours:
function levenstheinX($s1,$s2){
if(strlen($s1) > strlen($s2)) levenstheinX($s2,$s1);
$score = levenshtein($s1, $s2);
if(strlen($s1) > 0 ){
$diff = (double)$score / strlen($s1);
}else{ $diff = 0.0;}
return (1.0 - $diff);
}
THE ANSWER to the Bieber related question is 69%![]()