ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Masanz, James J." <Masanz.Ja...@mayo.edu>
Subject RE: Initializing and using clinical pipleline from java
Date Fri, 28 Nov 2014 15:56:16 GMT

The dictionary lookup annotator requires other annotators be run first.


-- James Masanz

From: Mansour Al Akeel [mansour.alakeel@gmail.com]
Sent: Friday, November 28, 2014 8:45 AM
To: user
Subject: Initializing and using clinical pipleline from java

I am using the following code to test initialization for the clinical
annotator from a junit test case:

    AnalysisEngineDescription description =

    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();


    long start = System.currentTimeMillis();
    long end = System.currentTimeMillis();

    System.out.println("processing done in : " + ((end - start) / 1000.0));

    XmlCasSerializer.serialize(jcas.getCas(), System.out);


The output is produced, however, there's no annotations added, and no
error or exception is thrown.

Am I missing something here??

Thank you.

View raw message