Closed reckart closed 6 years ago
@reckart One could also pass the name of the annotation directly with the field-name? I am not sure how the API looks for this but this would probably most straight forward? It was possible to reference the field of an annotation by a string-name, right?
I think the conversion process of outcome to actual annotation may be more complicated than the case that simply creating an instance of AnnotationFS and setting a field on it:
Ok. I uploaded a change. There is a test case in the example project in the package org.dkpro.tc.tcAnnotator
that demonstrates / test using such a conversion annotator.
@reckart Is the current implementation what you had in mind?
Currently, to use TcAnnotator in a production environment, one has to wrap it in another UIMA component which delegates to the TcAnnotator in its
process
method and after running it picks up theTextClassificationOutcome
annotations, creates the actually desired outcome annotations and then removes the outcomes.In order to avoid the need for creating a wrapper UIMA component all the time, it might be a nice idea to pass the name of a converter class to TcAnnotator which would be called with the JCas as an argument after TcAnnotator completes its
process
method - thus the conversion can happen within the scope of the TcAnnotator.