A Graph Theoretic Approach to Similarity Relations