de.aitools.dm.clusterlabeling.algorithms
Class ACarrot2ClusterLabeler
java.lang.Object
de.aitools.dm.clustering.algorithms.ASoftClusterer
de.aitools.dm.clusterlabeling.algorithms.ASoftClusterLabeler
de.aitools.dm.clusterlabeling.algorithms.ACarrot2ClusterLabeler
- All Implemented Interfaces:
- SoftClusterer, ClusterLabeler
- Direct Known Subclasses:
- BiSectingKMeans, Lingo, LongTailClusterer, LongTailClusterer2, NoShadowingLabeler, NoShadowingLabeler2, SuffixTreeClustering
public abstract class ACarrot2ClusterLabeler
- extends ASoftClusterLabeler
- Version:
- $Id: ACarrot2ClusterLabeler.java,v 1.4 2011/11/15 10:51:25 hoppe Exp $
- Author:
- dennis.hoppe(/\t)uni-weimar.de
Method Summary |
abstract java.util.Collection<org.carrot2.core.Cluster> |
cluster(java.util.List<org.carrot2.core.Document> data)
Creates the clustering based on Carrot2's implementation of Lingo. |
abstract java.util.Collection<org.carrot2.core.Cluster> |
cluster(java.util.List<org.carrot2.core.Document> data,
java.lang.String query)
|
java.util.Collection<org.carrot2.core.Cluster> |
cluster(Result[] data)
|
java.util.Collection<org.carrot2.core.Cluster> |
cluster(Result[] data,
java.lang.String query)
|
int[][] |
clusterSoft(java.util.List<org.carrot2.core.Document> data)
|
int[][] |
clusterSoft(Result[] data)
Clusters the input data. |
int[][] |
clusterSoft(java.lang.String[] data)
Clusters the input data. |
int[][] |
clusterSoft(Vector[] data)
|
int[][] |
convertAssignment(int dataSize,
java.util.Collection<org.carrot2.core.Cluster> clustering)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACarrot2ClusterLabeler
public ACarrot2ClusterLabeler()
cluster
public abstract java.util.Collection<org.carrot2.core.Cluster> cluster(java.util.List<org.carrot2.core.Document> data)
- Creates the clustering based on Carrot2's implementation of Lingo.
- Parameters:
data
- text documents as input
- Returns:
- a
Collection
of Cluster
s
cluster
public abstract java.util.Collection<org.carrot2.core.Cluster> cluster(java.util.List<org.carrot2.core.Document> data,
java.lang.String query)
clusterSoft
public int[][] clusterSoft(java.lang.String[] data)
- Description copied from class:
ASoftClusterLabeler
- Clusters the input data. Be aware that some cluster labeling algorithms
such as
Lingo
perform their own tokenization. Thus, you should
not perform stopword removal and stemming prior to calling
ASoftClusterLabeler.clusterSoft(String[])
.
- Specified by:
clusterSoft
in class ASoftClusterLabeler
- Parameters:
data
- input as text documents
- Returns:
- the clustering of input texts as an 2d-array
clusterSoft
public int[][] clusterSoft(Vector[] data)
- Specified by:
clusterSoft
in interface SoftClusterer
- Specified by:
clusterSoft
in class ASoftClusterer
cluster
public java.util.Collection<org.carrot2.core.Cluster> cluster(Result[] data)
cluster
public java.util.Collection<org.carrot2.core.Cluster> cluster(Result[] data,
java.lang.String query)
clusterSoft
public int[][] clusterSoft(Result[] data)
- Description copied from class:
ASoftClusterLabeler
- Clusters the input data. Be aware that some cluster labeling algorithms
such as
Lingo
perform their own tokenization. Thus, you should
not perform stopword removal and stemming prior to calling
ASoftClusterLabeler.clusterSoft(String[])
.
- Specified by:
clusterSoft
in interface SoftClusterer
- Specified by:
clusterSoft
in class ASoftClusterLabeler
- Parameters:
data
- input as text documents
- Returns:
- the clustering of input texts as an 2d-array
clusterSoft
public int[][] clusterSoft(java.util.List<org.carrot2.core.Document> data)
convertAssignment
public int[][] convertAssignment(int dataSize,
java.util.Collection<org.carrot2.core.Cluster> clustering)