The call >> AnalysisEngineFactory.createPrimitiveDescription(TestEngine.class);
Scans the classpath for all type system descriptors, loads them and merges them. How this is done and how types can be made detectable is documented here: https://code.google.com/p/uimafit/wiki/TypeDescriptorDetection Btw. I've been playing with the thought of adding support for result-specs to uimaFIT. I'm thinking of something that starts with all the types declared by the component, which then allows easy removal of undesired types (which has so far been my most prominent use-case) without having to explicitly specify all types that should be in the result. Cheers, -- Richard Am 14.04.2013 um 07:19 schrieb Marshall Schor <[email protected]>: > From the source code you posted, it appears you are using UIMAFit, is this > correct? > > How are you specifying the UIMA Type system (which would need to contain a > definition for the type "test") for this? > > -Marshall > > On 4/13/2013 8:49 AM, Georg Fette wrote: >> Hello, >> I have a problem in understanding how to use the class "ResultSpecification". >> I thought that before I call "process(cas)" I configure an instance of >> ResultSpecification by adding types which have to be produced in the process >> call. My test code looks like this: >> >> MainClass: >> ------------------ >> AnalysisEngineDescription aed = >> AnalysisEngineFactory.createPrimitiveDescription(TestEngine.class); >> AnalysisEngine ae = AnalysisEngineFactory.createPrimitive(aed); >> ResultSpecification resultSpec = >> UIMAFramework.getResourceSpecifierFactory().createResultSpecification(); >> resultSpec.addResultType("test", true); >> CAS cas = CasCreationUtils.createCas(aed); >> ae.process(cas, resultSpec); >> >> TestEngine: >> ------------------------- >> @Override >> public void process(JCas arg0) throws AnalysisEngineProcessException { >> ResultSpecification resultSpec = getResultSpecification(); >> TypeOrFeature[] types = resultSpec.getResultTypesAndFeatures(); >> } >> >> Unfortunately the types-array in is retured by the resultSpec in the >> enginge's >> process method is always empty. >> What am I doing wrong ? >> Greetings >> Georg >> >
