/**
  * Run the pipeline on an input annotation. The annotation is modified in place.
  *
  * @param annotation The input annotation, usually a raw document
  */
 @Override
 public void annotate(Annotation annotation) {
   Iterator<MutableLong> it = accumulatedTime.iterator();
   Timing t = new Timing();
   for (Annotator annotator : annotators) {
     if (TIME) {
       t.start();
     }
     annotator.annotate(annotation);
     if (TIME) {
       long elapsed = t.stop();
       MutableLong m = it.next();
       m.incValue(elapsed);
     }
   }
 }
Beispiel #2
0
 public void annotate(Annotator annotator) {
   annotator.annotate(this);
 }