Hi,

I wanted to write a test for MyJCasMultiplier, to check how many JCases are 
created. Here is my code:

AnalysisEngineDescription segmenter =   
createEngineDescription(BreakIteratorSegmenter.class);

AnalysisEngineDescription multiplier = 
createEngineDescription(MyJCasMultiplier.class);
        
AggregateBuilder ab = new AggregateBuilder();
ab.add(segmenter);
ab.add(multiplier);

AnalysisEngine engine = ab.createAggregate();
engine.getAnalysisEngineMetaData().getOperationalProperties().setOutputsNewCASes(true);

JCas jCas = engine.newJCas();
jCas.setDocumentText(testString);
JCasIterator it = engine.processAndOutputNewCASes(jCas);

The problem is that engine.processAndOutputNewCASes(jCas) returns always 0 
JCases, but I know it should be more :) Did I miss something here or it is a 
framework issue?

Best,
Artem

Reply via email to