uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Augusto Ribeiro Silva <...@unsilo.com>
Subject Re: Non-linear pipelines
Date Fri, 24 Jun 2016 07:32:19 GMT
Hi Richard,

Thanks again for the help. I’ll give it a try.

Cheers,
Augusto

> On 23 Jun 2016, at 20:40, Richard Eckart de Castilho <rec@apache.org> wrote:
> 
> On 23.06.2016, at 14:02, Augusto Ribeiro Silva <ars@unsilo.com> wrote:
>> 
>> Thanks for the help. Is there any place where I can see how to define capabilities
in a non-XML way, i.e., using the Java API.
> 
> If you are using uimaFIT, you can declare capabilities using Java annotations, e.g.:
> 
> @TypeCapability(
>        inputs = { 
>            "de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token",
>            "de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Sentence" }, 
>        outputs = { 
>            "de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS" })
> public class OpenNlpPosTagger
> 	extends JCasAnnotator_ImplBase
> 
> These will then be present in descriptors created via AnalysisEngineFactory.createEngineDescription(...).
> 
> Otherwise, if you build your descriptors with the plain UIMA API, something like
> 
> Capability capability = new Capability_impl();
> ...
> AnalysisEngineDescription desc = UIMAFramework.getResourceSpecifierFactory()
>            .createAnalysisEngineDescription();
> ...
> desc.getAnalysisEngineMetaData().setCapabilities(new Capability[] { capability });
> 
> Cheers,
> 
> -- Richard


Mime
View raw message