edu.stanford.nlp.pipeline
Class Annotator.Requirement

java.lang.Object
  extended by edu.stanford.nlp.pipeline.Annotator.Requirement
Enclosing interface:
Annotator

public static class Annotator.Requirement
extends java.lang.Object

The Requirement is a general way of describing the pre and post conditions of an Annotator running. Typical use is to have constants for the different requirement types, such as the TOKENIZE_REQUIREMENT below, and to reuse those constants instead of creating new objects. It is also possible to subclass Requirement if an Annotator has a more general output. For example, one could imagine a TsurgeonAnnotator which has a wide range of possible effects; this would probably subclass Requirement to indicate which particular surgery it provided.
We do nothing to override the equals or hashCode methods. This means that two Requirements are equal iff they are the same object. We do not want to use name to decide equality because a subclass that uses more information, such as the particular kind of tsurgeon used in a hypothetical TsurgeonAnnotator, cannot use a stricter equals() than the superclass. It is hard to get stricter than ==.


Field Summary
 java.lang.String name
           
 
Constructor Summary
Annotator.Requirement(java.lang.String name)
           
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public final java.lang.String name
Constructor Detail

Annotator.Requirement

public Annotator.Requirement(java.lang.String name)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Stanford NLP Group