Fabio Mancinelli <fabio.mancine...@...> writes:

> 
> Hi everybody,
> 
> I was wondering how I could assemble a CPE from a Java program without
> using an XML descriptor.
> 
> The idea was to create analysis engines, collection readers and cas
> consumers and to assemble them programmatically in a CPE using Java
> code.
> 
> UIMAFramework.produceCollectionProcessingEngine() requires a
> CpeDescription object that apparently can be built only from an XML
> file (whose creation is not even supported by the Eclipse UIMA plugin
> and, afaiu, it must be created exclusively by using the cpeGui.sh
> program).
> 
> Any hint?
> 
> Thanks,
> Fabio
> 
> 
Fabio, there is a way to create a CpeDescriptor in your java program.
Use the following:

CpeDescription cd = CpeDescriptorFactory.produceDescriptor();

With the above you get a descriptor with default values. Use the API to change
the descriptor as needed.

Once you have the descriptor configured, you than call:

mCPE = UIMAFramework.produceCollectionProcessingEngine(cpeDesc);


Regards, Jerry C




Reply via email to