|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.ling.MapLabelFactory
public class MapLabelFactory
A MapLabelFactory
is a factory that makes a
Label
which is a MapLabel
.
Constructor Summary | |
---|---|
MapLabelFactory()
|
Method Summary | |
---|---|
static void |
main(String[] args)
Just for testing. |
Label |
newLabel(Label oldLabel)
Create a new MapLabel with the value of
oldLabel as its value. |
Label |
newLabel(String str)
Make a new label with this String as the value. |
Label |
newLabel(String str,
int options)
Make a new label with this String as the value. |
Label |
newLabelFromString(String str)
Make a new label with this String as the value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapLabelFactory()
Method Detail |
---|
public Label newLabel(String str)
String
as the value.
newLabel
in interface LabelFactory
str
- the string to use as a value
public Label newLabel(String str, int options)
String
as the value.
This implementation ignores the options.
newLabel
in interface LabelFactory
str
- the string to use as a valueoptions
- this argument is ignored
public Label newLabelFromString(String str)
String
as the value.
newLabelFromString
in interface LabelFactory
str
- the string to use as a value
public Label newLabel(Label oldLabel)
MapLabel
with the value of
oldLabel
as its value.If
oldLabel
is a MapLabel
, the new label is identical to
oldLabel
(but does not share storage).If
oldLabel
is a CategoryWordTag
, the category, word, and tag are
stored in the map of the new label under the map keys CATEGORY_KEY
, HEAD_WORD_KEY
, and HEAD_TAG_KEY
,
respectively.
newLabel
in interface LabelFactory
label
- the other label
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |