I am using the following code to test initialization for the clinical
annotator from a junit test case:
AnalysisEngineDescription description =
UmlsDictionaryLookupAnnotator.createAnnotatorDescription();
AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(description);
URL testFile = this.getClass().getResource("/clinical-text-1.txt");
byte[] encoded = Files.readAllBytes(Paths.get(testFile.toURI()));
String encoding = "UTF-8";
String textContent = new String(encoded, encoding);
JCas jcas = ae.newJCas();
jcas.setDocumentText(textContent);
long start = System.currentTimeMillis();
ae.process(jcas);
long end = System.currentTimeMillis();
System.out.println("processing done in : " + ((end - start) / 1000.0));
XmlCasSerializer.serialize(jcas.getCas(), System.out);
jcas.reset();
The output is produced, however, there's no annotations added, and no
error or exception is thrown.
Am I missing something here??
Thank you.