Hi David,
Thank you so much for your message, I try your solution and I got a pretty dendrogram :) I attach an image.
First, I created a method to represent the list of Merge objects returned by HAC algorithm as an object with the full hierarchy (parents and children).
For the output of clustering results to JSON file I used
https://github.com/google/gson I was reading in d3 documentation but seems like it can't visualize the similarity values in the diagram?
Right know I'm studying how to improve the dendrogram pointcut for all the documents of my collection to get better clusters, because I got some better than others. I've read that there is not an agreement by the researchers of an specific technique for this, some of them cut the dendrogram at some similarity level or as in my case select a number of merge steps on dependence of the size of texts. Could you recommend me another way of cutting to dendrogram to get best clusters?
best regards,
Carmen