ctakes-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour Al Akeel <mansour.alak...@gmail.com>
Subject Initializing and using clinical pipleline from java
Date Fri, 28 Nov 2014 14:45:55 GMT
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