@Override
protected Map<String, AnnotationStatistics<String>> test(
CollectionReader collectionReader,
File directory) throws Exception {
AggregateBuilder aggregateBuilder = this.getPreprocessorAggregateBuilder();
aggregateBuilder.add(CopyFromGold.getDescription(EventMention.class));
aggregateBuilder.add(CopyFromGold.getDescription(TimeMention.class));
aggregateBuilder.add(SentenceAnnotator.getDescription());
aggregateBuilder.add(TokenAnnotator.getDescription());
aggregateBuilder.add(PosTaggerAnnotator.getDescription());
aggregateBuilder.add(DefaultSnowballStemmer.getDescription("English"));
aggregateBuilder.add(ParserAnnotator.getDescription());
aggregateBuilder.add(EventToClearTKEventAnnotator.getAnnotatorDescription());//for every cTakes eventMention, create a cleartk event
aggregateBuilder.add(ClearTKDocumentCreationTimeAnnotator.getAnnotatorDescription());//for every jCAS create an empty DCT, and add it to index
aggregateBuilder.add(EventTenseAnnotator.FACTORY.getAnnotatorDescription("/org/cleartk/timeml/event/eventtenseannotator/model.jar"));
aggregateBuilder.add(EventAspectAnnotator.FACTORY.getAnnotatorDescription("/org/cleartk/timeml/event/eventaspectannotator/model.jar"));
aggregateBuilder.add(EventClassAnnotator.FACTORY.getAnnotatorDescription("/org/cleartk/timeml/event/eventclassannotator/model.jar"));
aggregateBuilder.add(EventPolarityAnnotator.FACTORY.getAnnotatorDescription("/org/cleartk/timeml/event/eventpolarityannotator/model.jar"));
aggregateBuilder.add(EventModalityAnnotator.FACTORY.getAnnotatorDescription("/org/cleartk/timeml/event/eventmodalityannotator/model.jar"));
aggregateBuilder.add(TemporalLinkEventToDocumentCreationTimeAnnotator.FACTORY.getAnnotatorDescription("/org/cleartk/timeml/tlink/temporallinkeventtodocumentcreationtimeannotator/model.jar"));
aggregateBuilder.add(ClearTKDocTimeRelAnnotator.getAnnotatorDescription());// for every tlink, check if it cover and event, add the tlink type to the event's docTimeRel attribute
Function<EventMention, ?> eventMentionToSpan = AnnotationStatistics.annotationToSpan();
Map<String, Function<EventMention, String>> propertyGetters;
propertyGetters = new HashMap<String, Function<EventMention, String>>();
for (String name : PROPERTY_NAMES) {
propertyGetters.put(name, getPropertyGetter(name));
}
Map<String, AnnotationStatistics<String>> statsMap = new HashMap<String, AnnotationStatistics<String>>();
statsMap.put(DOC_TIME_REL, new AnnotationStatistics<String>());
for (JCas jCas : new JCasIterable(collectionReader, aggregateBuilder.createAggregate())) {
JCas goldView = jCas.getView(GOLD_VIEW_NAME);
JCas systemView = jCas.getView(CAS.NAME_DEFAULT_SOFA);
String text = goldView.getDocumentText();
for (Segment segment : JCasUtil.select(jCas, Segment.class)) {
if (!THYMEData.SEGMENTS_TO_SKIP.contains(segment.getId())) {