org.apache.nutch.clustering.carrot2
Class HitsClusterAdapter
java.lang.Object
org.apache.nutch.clustering.carrot2.HitsClusterAdapter
- All Implemented Interfaces:
- HitsCluster
- public class HitsClusterAdapter
- extends Object
- implements HitsCluster
An adapter of Carrot2's RawCluster interface to
HitsCluster interface.
- Version:
- $Id: HitsClusterAdapter.java,v 1.1 2004/08/09 23:23:53 johnnx Exp $
- Author:
- Dawid Weiss
|
Constructor Summary |
HitsClusterAdapter(com.dawidweiss.carrot.core.local.clustering.RawCluster rawCluster,
HitDetails[] hits)
Creates a new adapter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HitsClusterAdapter
public HitsClusterAdapter(com.dawidweiss.carrot.core.local.clustering.RawCluster rawCluster,
HitDetails[] hits)
- Creates a new adapter.
getSubclusters
public HitsCluster[] getSubclusters()
- Specified by:
getSubclusters in interface HitsCluster
- Returns:
- Returns an array of
HitsCluster objects
that are sub-groups of the current group, or null
if this cluster has no sub-groups.
getHits
public HitDetails[] getHits()
- Specified by:
getHits in interface HitsCluster
- Returns:
- Returns a relevance-ordered array of the hits belonging
to this cluster or
null if this cluster
has no associated documents (it may have subclusters only).
getDescriptionLabels
public String[] getDescriptionLabels()
- Specified by:
getDescriptionLabels in interface HitsCluster
- Returns:
- Returns an array of labels for this cluster. The labels should
be sorted according to their relevance to the cluster's content. Not
all of the labels must be displayed - the application is free to
set a cutoff threshold and display only the topmost labels.
isJunkCluster
public boolean isJunkCluster()
- Description copied from interface:
HitsCluster
- Returns
true if this cluster constains documents
that did not fit anywhere else (presentation layer may
discard such clusters).
Subclusters of this cluster are also junk clusters, even if
they don't have this property set to true
- Specified by:
isJunkCluster in interface HitsCluster
Copyright © 2006 The Apache Software Foundation