edu.stanford.nlp.pipeline
Class Annotation

java.lang.Object
  extended by edu.stanford.nlp.util.ArrayCoreMap
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.stanford.nlp.util.TypesafeMap
TypesafeMap.Key<BASE,VALUE>
 
Constructor Summary
Annotation()
          Deprecated. 
Annotation(Annotation map)
          Copy constructor.
Annotation(String text)
          The text becomes the CoreAnnotations.TextAnnotation of the newly created Annotation.
 
Method Summary
 Annotation copy()
          Copies the map, but not a deep copy.
 String toString()
           
 
Methods inherited from class edu.stanford.nlp.util.ArrayCoreMap
compact, containsKey, equals, get, has, hashCode, keySet, remove, set, setCapacity, size, toShorterString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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. 

Method Detail

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