Code example for Hashtable

Methods: values

0
	} 
 
	public double getCosineSimilarity(DocumentVector document) { 
 
		if (vector == null) { 
			vector = VectorUtil.getNormalizedVector(table.values(), vocabulary); 
		} 
 
		double[] documentVector = VectorUtil.getNormalizedVector(document.values(), vocabulary); 
 
		return VectorUtil.dotProduct(vector, documentVector); 
 
	} 
 
	public boolean isPositive() { 
		return isLinguistic; 
	} 
 
}