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