Package edu.stanford.nlp.ling
Interface AbstractCoreLabel
-
- All Superinterfaces:
AbstractToken,HasContext,HasIndex,HasLemma,HasNER,HasOffset,HasOriginalText,HasTag,HasWord,Label,Serializable,TypesafeMap
- All Known Implementing Classes:
CoreLabel,IndexedWord
public interface AbstractCoreLabel extends AbstractToken, Label, TypesafeMap
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface edu.stanford.nlp.util.TypesafeMap
TypesafeMap.Key<VALUE>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <KEY extends TypesafeMap.Key<String>>
StringgetString(Class<KEY> key)Return a non-null String value for a key.<KEY extends TypesafeMap.Key<String>>
StringgetString(Class<KEY> key, String def)-
Methods inherited from interface edu.stanford.nlp.ling.HasContext
after, before, originalText, setAfter, setBefore, setOriginalText
-
Methods inherited from interface edu.stanford.nlp.ling.HasIndex
docID, index, sentIndex, setDocID, setIndex, setSentIndex
-
Methods inherited from interface edu.stanford.nlp.ling.HasOffset
beginPosition, endPosition, setBeginPosition, setEndPosition
-
Methods inherited from interface edu.stanford.nlp.ling.HasOriginalText
originalText, setOriginalText
-
Methods inherited from interface edu.stanford.nlp.ling.Label
labelFactory, setFromString, setValue, toString, value
-
Methods inherited from interface edu.stanford.nlp.util.TypesafeMap
containsKey, get, keySet, remove, set, size
-
-
-
-
Method Detail
-
getString
<KEY extends TypesafeMap.Key<String>> String getString(Class<KEY> key)
Return a non-null String value for a key. This method is included for backwards compatibility with the removed class AbstractMapLabel. It is guaranteed to not return null; if the key is not present or has a null value, it returns the empty string (""). It is only valid to call this method when key is paired with a value of type String.- Type Parameters:
KEY- A key type with a String value- Parameters:
key- The key to return the value of.- Returns:
- "" if the key is not in the map or has the value
nulland the String value of the key otherwise
-
getString
<KEY extends TypesafeMap.Key<String>> String getString(Class<KEY> key, String def)
-
-