/* Query an the required number of results */
attributes.put(CommonAttributesDescriptor.Keys.QUERY, "clustering");
attributes.put(CommonAttributesDescriptor.Keys.RESULTS, 50);
/* Perform processing */
final ProcessingResult result = controller.process(attributes,
Bing3WebDocumentSource.class, STCClusteringAlgorithm.class);
/* Documents fetched from the document source, clusters created by Carrot2. */
final List<Document> documents = result.getDocuments();
final List<Cluster> clusters = result.getClusters();