|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.trees.Constituent
edu.stanford.nlp.trees.SimpleConstituent
edu.stanford.nlp.trees.LabeledConstituent
public class LabeledConstituent
A LabeledConstituent
object represents a single bracketing in
a derivation, including start and end points and Label
information, but excluding probabilistic information. It is used
to represent the basic information that is accumulated in exploring parses.
Constructor Summary | |
---|---|
LabeledConstituent()
Create an empty LabeledConstituent object. |
|
LabeledConstituent(int start,
int end)
Create a LabeledConstituent object with given
values. |
|
LabeledConstituent(int start,
int end,
Label label)
Create a LabeledConstituent object with given values. |
|
LabeledConstituent(int start,
int end,
String stringValue)
Create a LabeledConstituent 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. |
Label |
label()
access label |
LabelFactory |
labelFactory()
Return a factory for this kind of label. |
void |
setFromString(String labelStr)
Make a new label with this String as the "name", perhaps
by doing some appropriate decoding of the string. |
void |
setLabel(Label label)
Sets the label associated with the current Constituent, if there is one. |
Methods inherited from class edu.stanford.nlp.trees.SimpleConstituent |
---|
end, setEnd, setStart, start |
Methods inherited from class edu.stanford.nlp.trees.Constituent |
---|
contains, crosses, crosses, equals, hashCode, labels, score, setLabels, setScore, setValue, size, toSentenceString, toString, value |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LabeledConstituent()
LabeledConstituent
object.
public LabeledConstituent(int start, int end)
LabeledConstituent
object with given
values.
start
- Start node of edgeend
- End node of edgepublic LabeledConstituent(int start, int end, Label label)
LabeledConstituent
object with given values.
start
- Start node of edgeend
- End node of edgelabel
- The label of the Constituent
public LabeledConstituent(int start, int end, String stringValue)
LabeledConstituent
object with given values.
start
- Start node of edgeend
- End node of edgestringValue
- The name of the Constituent
Method Detail |
---|
public Label label()
Constituent
label
in interface Labeled
label
in class Constituent
public void setLabel(Label label)
Constituent
setLabel
in interface Labeled
setLabel
in class Constituent
label
- The Label valuepublic void setFromString(String labelStr)
Constituent
String
as the "name", perhaps
by doing some appropriate decoding of the string.
setFromString
in interface Label
setFromString
in class Constituent
labelStr
- the String that translates into the content of the
labelpublic LabelFactory labelFactory()
labelFactory
in interface Label
labelFactory
in class SimpleConstituent
public ConstituentFactory constituentFactory()
constituentFactory
in class SimpleConstituent
public static ConstituentFactory factory()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |