com.sun.labs.minion.classification
Class StemmingClusterer

java.lang.Object
  extended by com.sun.labs.minion.classification.ContingencyFeatureClusterer
      extended by com.sun.labs.minion.classification.StemmingClusterer
All Implemented Interfaces:
FeatureClusterer

public class StemmingClusterer
extends ContingencyFeatureClusterer

Provides a clusterer that groups features that have the same stems.


Field Summary
protected  java.util.HashMap clusterMap
           
protected static java.lang.String logTag
          The log tag
protected  PorterStemmer stemmer
           
 
Fields inherited from class com.sun.labs.minion.classification.ContingencyFeatureClusterer
clusters, field, type
 
Constructor Summary
StemmingClusterer()
           
StemmingClusterer(int type)
           
 
Method Summary
protected  void addFeature(ContingencyFeature feat)
          Adds a feature to this feature clusterer.
protected  FeatureClusterSet getClusters()
          Returns a set of feature clusters.
 FeatureClusterer newInstance()
          A non-static factory method to create a feature clusterer
 
Methods inherited from class com.sun.labs.minion.classification.ContingencyFeatureClusterer
cluster, collectFeatures, newCluster, newFeature, setDocCache, setField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logTag

protected static java.lang.String logTag
The log tag


stemmer

protected PorterStemmer stemmer

clusterMap

protected java.util.HashMap clusterMap
Constructor Detail

StemmingClusterer

public StemmingClusterer()

StemmingClusterer

public StemmingClusterer(int type)
Method Detail

newInstance

public FeatureClusterer newInstance()
Description copied from interface: FeatureClusterer
A non-static factory method to create a feature clusterer

Specified by:
newInstance in interface FeatureClusterer
Overrides:
newInstance in class ContingencyFeatureClusterer
Returns:
a feature clusterer instance

addFeature

protected void addFeature(ContingencyFeature feat)
Description copied from class: ContingencyFeatureClusterer
Adds a feature to this feature clusterer. This may create a new cluster for the feature, or may add the feature to an existing cluster. If you're writing your own clusterer, override this method.

Overrides:
addFeature in class ContingencyFeatureClusterer
Parameters:
feat - the feature to add

getClusters

protected FeatureClusterSet getClusters()
Description copied from class: ContingencyFeatureClusterer
Returns a set of feature clusters. Feature Clusters in this case will be ContingencyFeatures that represent clusters rather than single features. If you're writing your own clusterer, override this method.

Overrides:
getClusters in class ContingencyFeatureClusterer
Returns:
a set of clusters