com.sun.labs.minion.classification
Class StemmingClusterer
java.lang.Object
com.sun.labs.minion.classification.ContingencyFeatureClusterer
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logTag
protected static java.lang.String logTag
- The log tag
stemmer
protected PorterStemmer stemmer
clusterMap
protected java.util.HashMap clusterMap
StemmingClusterer
public StemmingClusterer()
StemmingClusterer
public StemmingClusterer(int type)
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