edu.stanford.nlp.pipeline
Class Annotation
java.lang.Object
edu.stanford.nlp.util.ArrayCoreMap
edu.stanford.nlp.pipeline.Annotation
- All Implemented Interfaces:
- CoreMap, TypesafeMap<CoreMap>, Serializable
public class Annotation
- extends ArrayCoreMap
An annotation representing a span of text in a document.
Basically just an implementation of CoreMap that knows about text.
There was an original set of keys for annotation pipelines, listed here
and still used in older code, but now you're meant to use the ones in
CoreAnnotations.
- Author:
- Jenny Finkel, Anna Rafferty, bethard
- See Also:
- Serialized Form
Methods inherited from class edu.stanford.nlp.util.ArrayCoreMap |
compact, containsKey, equals, get, has, hashCode, keySet, remove, set, setCapacity, size, toShorterString |
Annotation
public Annotation(Annotation map)
- Copy constructor.
- Parameters:
map
- The new Annotation copies this one.
Annotation
public Annotation(String text)
- The text becomes the CoreAnnotations.TextAnnotation of the newly
created Annotation.
Annotation
@Deprecated
public Annotation()
- Deprecated.
copy
public Annotation copy()
- Copies the map, but not a deep copy.
- Returns:
- The copy
toString
public String toString()
- Overrides:
toString
in class ArrayCoreMap
Stanford NLP Group