Hi All, Does anyone knows how to load AggregatePlaintextUMLSProcessor.xml as stream using getAsStream method specified in following best practices link.
https://cwiki.apache.org/confluence/display/CTAKES/Best+Practices Example : FileLocator.getAsStream("desc/analysis_engine/AggregatePlaintextUMLSProcessor.xml"); I wanted to deploy "ctakes-clinical-pipeline" package as a standalone console app. then I created runnable jar with all the resources are packed into jar. This is how I ran the jar in Windows with run-time arguments ------------------------------------------------------------------------------------------- java -cp "%CTAKES_HOME%/desc/;%CTAKES_HOME%/resources/;%CTAKES_HOME%/lib/*" -Dlog4j.configuration=file:/%CTAKES_HOME%/config/log4j.xml -Xms512M -Xmx3g -jar ctakes-3.1.0-clinical-pipeline-runnable-pack.jar input.txt C:/xmi-ouput-directory ouput.txt I got following error : - Caused by: org.apache.uima.util.InvalidXMLException: An import could not be resolved. No .xml file with name "desc/analysis_engine/AggregatePlaintextUMLSProcessor" was found in the class path or data path. (Descriptor: <unknown>) ctakes-3.1.0 :- https://svn.apache.org/repos/asf/ctakes/branches/ctakes-3.1.0/ctakes-clinical-pipeline/src/main/java/org/apache/ctakes/clinicalpipeline/ClinicalPipelineWithUmls.java in the above file I want to replace bellow code line AnalysisEngineDescription pipelineIncludingUmlsDictionaries = AnalysisEngineFactory.createEngineDescription("desc/analysis_engine/AggregatePlaintextUMLSProcessor"); with :- InputStream filename = FileLocator.getAsStream("desc/analysis_engine/AggregatePlaintextUMLSProcessor.xml"); I want this to be solved in cTakes 3.1.0 because cTakes 3.1.0 "ctakes-clinical-pipeline" produce xmi file with types:Concept & conceptText attributes but cTakes 3.2.3 doesn't provide concept type tag it's only provide refsem:UmlsConcept tag by using cTakes 3.2.3 it's harder to find-out concepts ( I know cui="C0016504" and tui="T023" there but it's easy to find-out concepts using cTakes 3.1.0 ) cTakes-3.1.0 produced xmi file concept tag example ------------------------------------------------------------------------------- <types:Concept xmi:id="16651" sofa="1" begin="1204" end="1234" conceptType="PROBLEM" conceptText="subacute combined degeneration" externalId="0" originalEntityExternalId="11910"/> <types:Concept xmi:id="16659" sofa="1" begin="1222" end="1234" conceptType="PROBLEM" conceptText="degeneration" externalId="0" originalEntityExternalId="11854"/> <refsem:UmlsConcept xmi:id="11345" codingScheme="SNOMED" code="168490008" oid="168490008#SNOMED" cui="C0022885" tui="T059"/> <refsem:UmlsConcept xmi:id="11422" codingScheme="SNOMED" code="6322000" oid="6322000#SNOMED" cui="C0022885" tui="T059"/> cTakes-3.2.3 produced xmi file concept tag example ------------------------------------------------------------------------------- <refsem:UmlsConcept xmi:id="21538" codingScheme="SNOMED" code="56459004" oid="56459004#SNOMED" score="0.0" disambiguated="false" cui="C0016504" tui="T023"/> <refsem:UmlsConcept xmi:id="21342" codingScheme="SNOMED" code="123169005" oid="123169005#SNOMED" score="0.0" disambiguated="false" cui="C0015385" tui="T023"/> How do I achieve this ? how do I load resources as stream rather than accessing resources as a file ? Thanks W.P.Roshan -- SunONE