edu.stanford.nlp.trees
Class LabeledScoredConstituent

java.lang.Object
  |
  +--edu.stanford.nlp.trees.Constituent
        |
        +--edu.stanford.nlp.trees.SimpleConstituent
              |
              +--edu.stanford.nlp.trees.LabeledConstituent
                    |
                    +--edu.stanford.nlp.trees.LabeledScoredConstituent
All Implemented Interfaces:
Comparable, Label, Labeled, Scored

public class LabeledScoredConstituent
extends LabeledConstituent

A LabeledScoredConstituent object defines an edge in a graph with a label and a score.


Constructor Summary
LabeledScoredConstituent()
          Create an empty LabeledScoredConstituent object.
LabeledScoredConstituent(int start, int end)
          Create a LabeledScoredConstituent object with given values.
LabeledScoredConstituent(int start, int end, Label label, double score)
          Create a LabeledScoredConstituent object with given values.
 
Method Summary
 ConstituentFactory constituentFactory()
          Return a factory for this kind of constituent.
static ConstituentFactory factory()
          Return a factory for this kind of constituent.
 LabelFactory labelFactory()
          Return a factory for this kind of label.
 double score()
          Returns the score associated with the current node, or Nan if there is no score
 void setScore(double score)
          Sets the score associated with the current node, if there is one
 
Methods inherited from class edu.stanford.nlp.trees.LabeledConstituent
label, setLabel
 
Methods inherited from class edu.stanford.nlp.trees.SimpleConstituent
end, setEnd, setStart, start
 
Methods inherited from class edu.stanford.nlp.trees.Constituent
compareTo, equals, hashCode, labels, setFromString, setLabels, setValue, size, toSentenceString, toString, value
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LabeledScoredConstituent

public LabeledScoredConstituent()
Create an empty LabeledScoredConstituent object.


LabeledScoredConstituent

public LabeledScoredConstituent(int start,
                                int end)
Create a LabeledScoredConstituent object with given values.

Parameters:
start - start node of edge
end - end node of edge

LabeledScoredConstituent

public LabeledScoredConstituent(int start,
                                int end,
                                Label label,
                                double score)
Create a LabeledScoredConstituent object with given values.

Parameters:
start - start node of edge
end - end node of edge
Method Detail

score

public double score()
Returns the score associated with the current node, or Nan if there is no score

Specified by:
score in interface Scored
Overrides:
score in class Constituent
Returns:
the score

setScore

public void setScore(double score)
Sets the score associated with the current node, if there is one

Overrides:
setScore in class Constituent

labelFactory

public LabelFactory labelFactory()
Return a factory for this kind of label. The factory returned is always the same one (a singleton)

Specified by:
labelFactory in interface Label
Overrides:
labelFactory in class LabeledConstituent
Returns:
the label factory

constituentFactory

public ConstituentFactory constituentFactory()
Return a factory for this kind of constituent. The factory returned is always the same one (a singleton).

Overrides:
constituentFactory in class LabeledConstituent
Returns:
The constituent factory

factory

public static ConstituentFactory factory()
Return a factory for this kind of constituent. The factory returned is always the same one (a singleton).

Returns:
The constituent factory


Stanford NLP Group