1

I am working with carrot2 clustering engine (via the Java API) and have obtained clusters for some dummy data which is sitting in my database. I was wondering how do you display it in human readable form in a console application or web application?

Currently, I have my clusters in this format :

final List Cluster_List= result.getClusters();

result is of type "ProcessingResult" , defined in Carrot2 API.

If I try printing out the contents of Cluster_List using a naive approach I'll get the address of the object. Please guide me in setting up a way to display the contents of the clusters - labels,contents and if possible - scores!

Cheers! Anerudh

1 Answers1

1

Here is a utility Java class we're using to display clusters in the console:

https://github.com/carrot2/carrot2/blob/master/applications/carrot2-examples/examples/org/carrot2/examples/ConsoleFormatter.java

Stanislaw Osinski
  • 1,231
  • 1
  • 7
  • 9