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