edu.stanford.nlp.pipeline
Class Annotation
java.lang.Object
edu.stanford.nlp.util.ArrayCoreMap
edu.stanford.nlp.pipeline.Annotation
- All Implemented Interfaces:
- CoreMap, PrettyLoggable, TypesafeMap, java.io.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.
You're meant to use the annotation keys in CoreAnnotations for common
cases, but can define bespoke ones for unusual annotations.
- 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, prettyLog, remove, set, setCapacity, size, toShorterString, toShortString, toShortString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Annotation
public Annotation(Annotation map)
- Copy constructor.
- Parameters:
map
- The new Annotation copies this one.
Annotation
public Annotation(java.lang.String text)
- The text becomes the CoreAnnotations.TextAnnotation of the newly
created Annotation.
Annotation
public Annotation(java.util.List<CoreMap> sentences)
Annotation
@Deprecated
public Annotation()
- Deprecated.
copy
public Annotation copy()
- Copies the map, but not a deep copy.
- Returns:
- The copy
toString
public java.lang.String toString()
- Overrides:
toString
in class ArrayCoreMap
Stanford NLP Group