Automating the clustering process