uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Vovk <vovk.ar...@gmail.com>
Subject AnalysisEngine.processAndOutputNewCASes(...) in case of JCasMultiplier returns 0 JCases
Date Fri, 30 Aug 2013 21:32:20 GMT
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
Mime
View raw message