Package edu.stanford.nlp.ling
Class CoreAnnotations.IndexAnnotation
- java.lang.Object
-
- edu.stanford.nlp.ling.CoreAnnotations.IndexAnnotation
-
- All Implemented Interfaces:
CoreAnnotation<Integer>,TypesafeMap.Key<Integer>
- Enclosing class:
- CoreAnnotations
public static class CoreAnnotations.IndexAnnotation extends Object implements CoreAnnotation<Integer>
This indexes a token number inside a sentence. Standardly, tokens are indexed within a sentence starting at 1 (not 0: we follow common parlance whereby we speak of the first word of a sentence). This is generally an individual word or feature index - it is local, and may not be uniquely identifying without other identifiers such as sentence and doc. However, if these are the same, the index annotation should be a unique identifier for differentiating objects.
-
-
Constructor Summary
Constructors Constructor Description IndexAnnotation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<Integer>getType()Returns the type associated with this annotation.
-
-
-
Method Detail
-
getType
public Class<Integer> getType()
Description copied from interface:CoreAnnotationReturns the type associated with this annotation. This method must return the same class type as its value type parameter. It feels like one should be able to get away without this method, but because Java erases the generic type signature, that info disappears at runtime.- Specified by:
getTypein interfaceCoreAnnotation<Integer>
-
-