public class LabeledConstituent extends SimpleConstituent
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 and Description |
|---|
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,
java.lang.String stringValue)
Create a
LabeledConstituent object with given values. |
| Modifier and Type | Method and Description |
|---|---|
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(java.lang.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.
|
end, setEnd, setStart, startpublic 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 Constituentpublic LabeledConstituent(int start,
int end,
java.lang.String stringValue)
LabeledConstituent object with given values.start - Start node of edgeend - End node of edgestringValue - The name of the Constituentpublic Label label()
Constituentlabel in interface Labeledlabel in class Constituentpublic void setLabel(Label label)
ConstituentsetLabel in interface LabeledsetLabel in class Constituentlabel - The Label valuepublic void setFromString(java.lang.String labelStr)
ConstituentString as the "name", perhaps
by doing some appropriate decoding of the string.setFromString in interface LabelsetFromString in class ConstituentlabelStr - the String that translates into the content of the
labelpublic LabelFactory labelFactory()
labelFactory in interface LabellabelFactory in class SimpleConstituentpublic ConstituentFactory constituentFactory()
constituentFactory in class SimpleConstituentpublic static ConstituentFactory factory()