ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Zieher" <JZie...@gmx.de>
Subject ctakes 3.2.2 AggregatePlaintextFastUMLSProcessor webproject integration
Date Mon, 16 May 2016 18:08:23 GMT
I created a java webproject in netbeans 8.1 and integrated ctakes with the libs of the 3.2.2
binaries download, its desc and resource folder into the WEB-INF folder. 
I would like to run the AggregatePlaintextFastUMLSProcessor AE. Through debugging the code
below worked, if I comment the following engines in the AE descriptor.


String s =  this.getServletContext().getRealPath("/WEB-INF/desc/ctakes-clinical-pipeline/desc/analysis_engine/AggregatePlaintextFastUMLSProcessor.xml");  
File aed = new File(s);    
JCas jcas;
    try {
        pipelineIncludingUmlsDictionaries = AnalysisEngineFactory.createEngineDescriptionFromPath(s);
        AnalysisEngine ae = AnalysisEngineFactory.createEngine(pipelineIncludingUmlsDictionaries);
        jcas = JCasFactory.createJCas();
        jcas.setDocumentText("Fx of obesity but no fx of coronary artery diseases");
        SimplePipeline.runPipeline(jcas, ae);
        // Print out the IdentifiedAnnotation objects
                for (IdentifiedAnnotation entity : JCasUtil.select(jcas, IdentifiedAnnotation.class))
                    System.out.println("Entity: " + entity.getCoveredText()
+ " === Polarity: " + entity.getPolarity()+ "Class:"+ entity.getClass());
    } catch (UIMAException e) {
        // TODO Auto-generated catch block
    } catch (IOException e) {
        // TODO Auto-generated catch block
If I uncomment the cleartk engines I get this class not found error, although the class exists
in the ctakes-assertion-3.2.2.jar. 
org.apache.uima.resource.ResourceInitializationException: Initialization of annotator class
"org.apache.ctakes.assertion.medfacts.cleartk.HistoryCleartkAnalysisEngine" failed.  
(Descriptor: file:/C:/Users/..../Documents/NetBeansProjects/mta.parser/target/mta.parser-1.0-SNAPSHOT/WEB-INF/desc/ctakes-assertion/desc/analysis_engine/HistoryCleartkAnalysisEngine.xml)

My first question is are these engines very necessary for the nlp results ? 

Could this class not found error also belong to path problems caused by the webcontent location

Has anyone a project or description how to set up such a webproject ? 

I would be very happy if someone could help me.

Best regards,

View raw message