dkpro / dkpro-core

Collection of software components for natural language processing (NLP) based on the Apache UIMA framework.
https://dkpro.github.io/dkpro-core
Other
196 stars 67 forks source link

IxaPosTagger does not provide TypeCapability Annotation #1292

Closed WUUUGI closed 6 years ago

WUUUGI commented 6 years ago

Annotation should be:

@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" })

This is necessary because Java does not support Annotation inheritance. E.g.:

clazz.getAnnotation(TypeCapability.class);

returns null

reckart commented 6 years ago

@WUUUGI What you do is: you implement your annotation checking code such that it fetches superclasses and interfaces and checks them as well. Many frameworks (e.g. uimaFIT or Spring) do it this way. DKPro Core requires no change.