|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.trees.AdaptiveLabelFactory
An AdaptiveLabelFactory
object makes simple
Label
s for objects, by creating a label of an
appropriate type depending on the arguments passed in.
People haven't used this much. It may or may not be a good class to have.
Field Summary | |
static int |
CATEGORY_LABEL
|
static int |
WORD_LABEL
|
Constructor Summary | |
AdaptiveLabelFactory()
|
Method Summary | |
Label |
newLabel(Label oldLabel)
Create a new Label , where the label is
formed from
the Label object passed in. |
Label |
newLabel(String labelStr)
The AdaptiveLabelFactory does not support this operation, because it does not know what sort of label to make. |
Label |
newLabel(String labelStr,
int options)
Create a new Label , where the Label
is formed from the passed in String, using it to name the component
given by options . |
Label |
newLabelFromString(String labelStr)
The AdaptiveLabelFactory does not support this operation, because it does not know what sort of label to make. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int WORD_LABEL
public static final int CATEGORY_LABEL
Constructor Detail |
public AdaptiveLabelFactory()
Method Detail |
public Label newLabel(String labelStr)
newLabel
in interface LabelFactory
labelStr
- A string that determines the content of the label.
UnsupportedOperationException
public Label newLabel(String labelStr, int options)
Label
, where the Label
is formed from the passed in String, using it to name the component
given by options
.
newLabel
in interface LabelFactory
labelStr
- A String to use as the labeloptions
- What kind of label it is
public Label newLabelFromString(String labelStr)
newLabelFromString
in interface LabelFactory
labelStr
- A string that determines the content of the label.
UnsupportedOperationException
public Label newLabel(Label oldLabel)
Label
, where the label is
formed from
the Label
object passed in. Depending on the first
non-null
component, looking in
the order category, first, then word, and then tag, an object of
the appropriate sort is created.
newLabel
in interface LabelFactory
oldLabel
- The Label that the new label is being created from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |