public double similarity(Status s)
	{
		//get word freqs from status and put into a hashmap H
		HashMap<String,Integer> H = new HashMap<String,Integer>();
		String text = s.getText();
		String[] tweetWords = text.split("\\s+");
		for (String w : tweetWords)
		{
			if(!stopWords.contains(w))
			{
				if(H.containsKey(w))
					H.put(w, H.get(w) + 1);
				else
					H.put(w, 1);
			}
		}
		
		//get attribute vector for cache and status
		// weight it using which is tf-idf of all appearing words
		Set<String> words = wordHash.keySet();
		List<Double> cacheAttributes = new ArrayList<Double>();
		List<Double> statusAttributes = new ArrayList<Double>();
		for (String word : words){
			//Calculate the weight of the word wrt the rest of the cache
			cacheAttributes.add(tfidf(word,wordHash.get(word)));
			
			//If status contains that word, calculate its weight wrt the rest of the cache
			if (H.containsKey(word))
				statusAttributes.add(tfidf(word,H.get(word)));
			else
				statusAttributes.add(0.0);
		}
		
		double dotProduct = 0.0;
		double cacheMag = 0.0;
		double statusMag = 0.0;
		//take dot product, magnitudes
		for(int i = 0; i < cacheAttributes.size();i++)
		{
			dotProduct += cacheAttributes.get(i) * statusAttributes.get(i);
			cacheMag += Math.pow(cacheAttributes.get(i),2.0);
			statusMag += Math.pow(statusAttributes.get(i), 2.0);
		}
		statusMag = Math.sqrt(statusMag);
		cacheMag = Math.sqrt(cacheMag);
		cacheMag = cacheMag <= 0.0 ? 1 : cacheMag;
		statusMag = statusMag <= 0.0 ? 1 : statusMag;

		return dotProduct / (cacheMag * statusMag);
	}