edu.stanford.nlp.ling
Class CoreAnnotations.GenericTokensAnnotation
java.lang.Object
edu.stanford.nlp.ling.CoreAnnotations.GenericTokensAnnotation
- All Implemented Interfaces:
- CoreAnnotation<List<CoreMap>>, TypesafeMap.Key<CoreMap,List<CoreMap>>
- Enclosing class:
- CoreAnnotations
public static class CoreAnnotations.GenericTokensAnnotation
- extends Object
- implements CoreAnnotation<List<CoreMap>>
The CoreMap key for getting the tokens (can be words, phrases or anything that are of type CoreMap) contained by an annotation.
This key should be set for any annotation that contains tokens (words, phrases etc). It can be
done without much memory overhead using List.subList.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CoreAnnotations.GenericTokensAnnotation
public CoreAnnotations.GenericTokensAnnotation()
getType
public Class<List<CoreMap>> getType()
- Description copied from interface:
CoreAnnotation
- Returns 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:
getType
in interface CoreAnnotation<List<CoreMap>>
Stanford NLP Group