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.

see
https://svn.apache.org/repos/asf/ctakes/trunk/ctakes-clinical-pipeline/src/main/java/org/apache/ctakes/clinicalpipeline/ClinicalPipelineFactory.java

-- 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 =
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.

Mime
View raw message