edu.stanford.nlp.trees.international.negra
Class NegraLabel
java.lang.Object
edu.stanford.nlp.ling.ValueLabel
edu.stanford.nlp.ling.StringLabel
edu.stanford.nlp.trees.international.negra.NegraLabel
- All Implemented Interfaces:
- HasOffset, Label, java.io.Serializable, java.lang.Comparable<ValueLabel>
public class NegraLabel
- extends StringLabel
- See Also:
- Serialized Form
Constructor Summary |
NegraLabel(java.lang.String str)
|
NegraLabel(java.lang.String str,
java.util.Map<java.lang.String,java.lang.String> features)
|
NegraLabel(java.lang.String str,
java.lang.String edge,
java.util.Map<java.lang.String,java.lang.String> features)
|
Method Summary |
java.lang.String |
featureValue(java.lang.String feature)
|
java.lang.String |
getEdge()
|
LabelFactory |
labelFactory()
Return a factory for this kind of label
(i.e., StringLabel ). |
void |
setEdge(java.lang.String edge)
|
void |
setFeatureValue(java.lang.String feature,
java.lang.String value)
|
java.lang.String |
toString()
Return a string representation of the label. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
FEATURE_SEP
public static final java.lang.String FEATURE_SEP
- See Also:
- Constant Field Values
NegraLabel
public NegraLabel(java.lang.String str)
NegraLabel
public NegraLabel(java.lang.String str,
java.util.Map<java.lang.String,java.lang.String> features)
NegraLabel
public NegraLabel(java.lang.String str,
java.lang.String edge,
java.util.Map<java.lang.String,java.lang.String> features)
labelFactory
public LabelFactory labelFactory()
- Description copied from class:
StringLabel
- Return a factory for this kind of label
(i.e.,
StringLabel
).
The factory returned is always the same one (a singleton).
- Specified by:
labelFactory
in interface Label
- Overrides:
labelFactory
in class StringLabel
- Returns:
- The label factory
setEdge
public void setEdge(java.lang.String edge)
getEdge
public java.lang.String getEdge()
setFeatureValue
public void setFeatureValue(java.lang.String feature,
java.lang.String value)
featureValue
public java.lang.String featureValue(java.lang.String feature)
toString
public java.lang.String toString()
- Description copied from class:
ValueLabel
- Return a string representation of the label. This will just
be the
value()
if it is non-null
,
and the empty string otherwise.
- Specified by:
toString
in interface Label
- Overrides:
toString
in class StringLabel
- Returns:
- The string representation
Stanford NLP Group