public static String findCentroidEditDistance(String[] queries) {
		HashMap<String, Float> hm = new HashMap<String, Float>();
		float max = Float.MIN_VALUE;
		String centroidQuery = null;
		for (int i = 0; i < queries.length; i++) {
			String query = queries[i];
			float[] distances = new float[queries.length];
			for (int j = 0; j < queries.length; j++) {
				float val = new EuclideanDistance().getSimilarity(query,
						queries[j]);
				distances[j] = val;
			}
			float total = Float.MIN_VALUE;
			for (int k = 0; k < distances.length; k++) {
				total += distances[k];
			}
			// System.out.println(query.toString()+ " " +total);
			if (total > max) {
				max = total;
				centroidQuery = query;
			}
			hm.put(query, total);
		}
		//System.out.println("Minimum " + max + " " + centroidQuery);
		StringBuilder sb = new StringBuilder();
		sb.append(centroidQuery);
		sb.append(":");
		for(String s : queries){
			sb.append(s);
			sb.append(",");
		}
		//System.out.println("query " + Arrays.toString(queries) + " " + centroidQuery);
		return sb.toString();
	}