|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.ling.AbstractMapLabel
edu.stanford.nlp.ling.MapLabel
public class MapLabel
An AbstractMapLabel
implementation which uses Object equality and hashcode.
Field Summary |
---|
Fields inherited from class edu.stanford.nlp.ling.AbstractMapLabel |
---|
AFTER_KEY, ANSWER_KEY, ARG_KEY, BEFORE_KEY, CATEGORY_FUNCTIONAL_TAG_KEY, CATEGORY_KEY, CURRENT_KEY, FEATURES_KEY, GOLDANSWER_KEY, HEAD_TAG_KEY, HEAD_WORD_KEY, INDEX_KEY, LEFT_TERM_KEY, map, MARKING_KEY, NER_KEY, PARENT_KEY, SEMANTIC_HEAD_POS_KEY, SEMANTIC_HEAD_WORD_KEY, SPAN_KEY, TAG_KEY, VALUE_KEY, VERB_SENSE_KEY, WORD_KEY |
Constructor Summary | |
---|---|
MapLabel()
Create a new MapLabel with null value. |
|
MapLabel(Label label)
Create a new MapLabel with the value of another
Label as its value. |
|
MapLabel(String value)
Create a new MapLabel with the given value. |
Method Summary | |
---|---|
static LabelFactory |
factory()
Return a factory for MapLabel s. |
LabelFactory |
labelFactory()
Return a factory for MapLabel s. |
static void |
main(String[] args)
For testing only. |
static void |
setPrintOptions(String po)
|
String |
toString()
Return a String containing the value (and index,
if any) of this label. |
String |
toString(String format)
Returns a formatted string representing this label. |
Methods inherited from class edu.stanford.nlp.ling.AbstractMapLabel |
---|
after, answer, appendAfter, before, category, current, get, getFeatures, getSemanticTag, getSemanticWord, goldAnswer, headTag, headWord, index, map, ner, prependBefore, put, setAfter, setAnswer, setBefore, setCategory, setCurrent, setFeatures, setFromString, setGoldAnswer, setHeadTag, setHeadWord, setIndex, setMap, setNER, setSemanticTag, setSemanticWord, setSpan, setTag, setValue, setWord, span, tag, value, word |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MapLabel()
MapLabel
with null value.
public MapLabel(String value)
MapLabel
with the given value.
value
- the value of the new labelpublic MapLabel(Label label)
MapLabel
with the value of another
Label
as its value.
If the argument label is a MapLabel
, the new
label is identical to the argument label (but does not share
storage). If the argument is a MapLabel, it just copies the map, but
doesn't make copies of the map's contents.
If the argument label implements HasWord and/or HasTag, such as
a CategoryWordTag
, the category, word, and tag are
stored in the map of the new label under the map keys CATEGORY_KEY
, WORD_KEY
, and TAG_KEY
,
respectively.
label
- the other labelMethod Detail |
---|
public LabelFactory labelFactory()
MapLabel
s.
The factory returned is always the same one (a singleton).
public static LabelFactory factory()
MapLabel
s.
The factory returned is always the same one (a singleton).
public String toString()
String
containing the value (and index,
if any) of this label. This is equivalent to
toString("value-index").
toString
in interface Label
toString
in class Object
public String toString(String format)
String
.
Currently supported formats include:
CATEGORY_KEY
)INDEX_KEY
,
respectively, and prints them with a hyphen in between
public static void setPrintOptions(String po)
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |