de.aitools.dm.clusterlabeling.algorithms
Class ACarrot2ClusterLabeler

java.lang.Object
  extended by de.aitools.dm.clustering.algorithms.ASoftClusterer
      extended by de.aitools.dm.clusterlabeling.algorithms.ASoftClusterLabeler
          extended by 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

Constructor Summary
ACarrot2ClusterLabeler()
           
 
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 de.aitools.dm.clusterlabeling.algorithms.ASoftClusterLabeler
getClusterLabels
 
Methods inherited from class de.aitools.dm.clustering.algorithms.ASoftClusterer
clusterSoft, getBiggestRange
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACarrot2ClusterLabeler

public ACarrot2ClusterLabeler()
Method Detail

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 Clusters

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)