public double getSimilarity(String a, String b) {

		LinkedList<String> pairs1 = wordLetterPairs(a.toUpperCase());
		LinkedList<String> pairs2 = wordLetterPairs(b.toUpperCase());

		int intersection = 0;

		int union = pairs1.size() + pairs2.size();

		for (int i = 0; i < pairs1.size(); i++) {

			Object pair1 = pairs1.get(i);

			for (int j = 0; j < pairs2.size(); j++) {

				Object pair2 = pairs2.get(j);

				if (pair1.equals(pair2)) {

					intersection++;

					pairs2.remove(j);

					break;

				}

			}

		}

		return (2.0 * intersection) / union;

	}