|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.extensions.textual.carrot2.CarrotClusterer
public class CarrotClusterer
Clusters documents using the Carrot2 framework. This framework uses Lucene to index and retrieve relevant documents for a query, and then cluster them assigning a "descriptive label" for each one.
To learn how to use this class see the TestCarrot example.
LuceneIndex
,
TestCarrot
Constructor Summary | |
---|---|
CarrotClusterer(LuceneIndex index,
java.lang.String[] searchFields)
Creates a Carrot Clusterer for the given Lucene Index. |
|
CarrotClusterer(LuceneIndex index,
java.lang.String[] searchFields,
int maxclusters)
Creates a Carrot Clusterer for the given Lucene Index that returns a maximum number of documents in each search. |
Method Summary | |
---|---|
CarrotClusteringResult |
cluster(java.lang.String query)
Clusters the documents for the given query. |
CarrotClusteringResult |
cluster(java.lang.String query,
int maxResults)
Clusters the documents for the given query, retrieving a maximum of documents from Lucene. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CarrotClusterer(LuceneIndex index, java.lang.String[] searchFields)
index
- Index of documentssearchFields
- Fields where search inside the document. Each lucene index is divided in several fields an the search can be performed in some of them.public CarrotClusterer(LuceneIndex index, java.lang.String[] searchFields, int maxclusters)
index
- Index of documentssearchFields
- Fields where search inside the document. Each lucene index is divided in several fields an the search can be performed in some of them.maxclusters
- Max number of clusters to return (approximately).Method Detail |
---|
public CarrotClusteringResult cluster(java.lang.String query)
public CarrotClusteringResult cluster(java.lang.String query, int maxResults)
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |