org.carrot2.filter.stc.algorithm
Class BaseCluster

java.lang.Object
  extended by org.carrot2.filter.stc.algorithm.BaseCluster

public final class BaseCluster
extends Object

A base cluster in the STC algorithm. A base cluster is basically a Node in suffix tree with an associated score and assigned later links to other nodes in base clusters graph.


Field Summary
protected  int id
          id number assigned by the creator of this object
protected  List neighbors
          Base clusters this object has links to in base clusters graph
protected  Phrase phrase
          This node's phrase
protected  float score
          Score of this base cluster (passed to constructor)
 
Constructor Summary
BaseCluster(PhraseNode node, float score)
          Public constructor for BaseCluster requires a node and precalculated score
 
Method Summary
 void addLink(BaseCluster neighbor)
          Adds a link to another BaseCluster (used when constructing base clusters graph
 int getId()
          getter for id
 List getNeighborsList()
          Retrieves the list of neighbors of this base cluster
 PhraseNode getNode()
          Getter for node variable
 Phrase getPhrase()
          Getter for this base cluster's phrase object
 float getScore()
          Getter for score variable
 boolean isMerged()
           
 void setId(int id)
          Setter for id
 void setMerged(boolean merged)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

score

protected float score
Score of this base cluster (passed to constructor)


neighbors

protected List neighbors
Base clusters this object has links to in base clusters graph


id

protected int id
id number assigned by the creator of this object


phrase

protected Phrase phrase
This node's phrase

Constructor Detail

BaseCluster

public BaseCluster(PhraseNode node,
                   float score)
Public constructor for BaseCluster requires a node and precalculated score

Method Detail

getNode

public PhraseNode getNode()
Getter for node variable


getScore

public float getScore()
Getter for score variable


setId

public void setId(int id)
Setter for id


getId

public int getId()
getter for id


addLink

public void addLink(BaseCluster neighbor)
Adds a link to another BaseCluster (used when constructing base clusters graph


getNeighborsList

public List getNeighborsList()
Retrieves the list of neighbors of this base cluster


getPhrase

public Phrase getPhrase()
Getter for this base cluster's phrase object


setMerged

public void setMerged(boolean merged)

isMerged

public boolean isMerged()


Copyright (c) Dawid Weiss, Stanislaw Osinski