public double tfidf(String word, int freq)
	{
		int corpusFrq = 1; //adding 1 prevents divide by zero
		if(corpusHash.containsKey(word))
			corpusFrq += corpusHash.get(word);
		double idf = Math.log((float) corpusSize / (float) corpusFrq);
		return freq*idf;
	}