我正在尝试使用uimaFit构建数据处理管道,如下所示:
[annotatorA]
=>
[Consumer to dump annotatorA's annotations from CAS into DB]
[annotatorB (should take on annotatorA's annotations from DB as input)]
=>
[Consumer for annotatorB]
驱动程序代码:
CollectionReader readerInstance= CollectionReaderFactory.createCollectionReader(
FilePathReader.class, typeSystem,
FilePathReader.PARAM_INPUT_FILE,"/path/to/file/to/be/processed");
AnalysisEngineDescription annotatorAInstance=
AnalysisEngineFactory.createPrimitiveDescription(
annotatorADbConsumer.class, typeSystem,
annotatorADbConsumer.PARAM_DB_URL,"localhost",
annotatorADbConsumer.PARAM_DB_NAME,"xyz",
annotatorADbConsumer.PARAM_DB_USER_NAME,"name",
annotatorADbConsumer.PARAM_DB_USER_PWD,"pw");
builder.add(annotatorAInstance);
AnalysisEngineDescription annotatorBInstance =
AnalysisEngineFactory.createPrimitiveDescription(
GateDateTimeLengthAnnotator.class,typeSystem)
builder.add(annotatorBInstance);
SimplePipeline.runPipeline(readerInstance, builder.createAggregate());
我的问题是:
-
上述方法是否正确?
-
在步骤2中,我们如何定义注释器A输出在注释器B中的依赖性?
建议的方法是
https://code.google.com/p/uimafit/wiki/ExternalResources#Resource_injection
,实现这一目标的正确方向?