+ "The patient was well till 6 months ago, when he started having a little blood with stool.";
JCas jcas = JCasFactory.createJCas();
jcas.setDocumentText(note);
// Get the default pipeline with umls dictionary lookup
AggregateBuilder builder = new AggregateBuilder();
builder.add(ClinicalPipelineFactory.getTokenProcessingPipeline());
builder.add(AnalysisEngineFactory
.createPrimitiveDescription(CopyNPChunksToLookupWindowAnnotations.class));
builder.add(AnalysisEngineFactory
.createPrimitiveDescription(RemoveEnclosedLookupWindows.class));
// Commented out the Dictionary lookup for the test
// Uncomment and set -Dctakes.umlsuser and -Dctakes.umlspw env params if
// needed
//builder.add(UmlsDictionaryLookupAnnotator.createAnnotatorDescription());
builder.add(ClearNLPDependencyParserAE.createAnnotatorDescription());
// Add BackwardsTimeAnnotator
builder.add(BackwardsTimeAnnotator
.createAnnotatorDescription("/org/apache/ctakes/temporal/ae/timeannotator/model.jar"));
// Add EventAnnotator
builder.add(EventAnnotator
.createAnnotatorDescription("/org/apache/ctakes/temporal/ae/eventannotator/model.jar"));
// Add ContextualModalityAnnotator
builder.add(ContextualModalityAnnotator
.createAnnotatorDescription("/org/apache/ctakes/temporal/ae/contextualmodality/model.jar"));
// Add DocTimeRelAnnotator
builder.add(DocTimeRelAnnotator
.createAnnotatorDescription("/org/apache/ctakes/temporal/ae/doctimerel/model.jar"));
//builder.createAggregateDescription().toXML(new FileWriter("desc/analysis_engine/TemporalAggregateUMLSPipeline.xml"));
SimplePipeline.runPipeline(jcas, builder.createAggregateDescription());
Collection<EventMention> mentions = JCasUtil.select(jcas,
EventMention.class);
ArrayList<String> temp = new ArrayList<>();