Hello,
i'm working on a MongoDB Cas Cosumer which consumes the openNLP CAS
Documents. Right now i'm having problems to correctly initialize the
TypeSystem. The following does not work. I bet this is because i do not
rely on the Annotators anymore and just want to grab the annotations.
But how can i address the types in a CAS_Consumer the right way using
the uima openNLP tools?
String sentenceTypeName =
CasConsumerUtil.getRequiredStringParameter(getUimaContext(),
UimaUtil.SENTENCE_TYPE_PARAMETER);
String tokenTypeName =
CasConsumerUtil.getRequiredStringParameter(getUimaContext(),
UimaUtil.TOKEN_TYPE_PARAMETER);
mSentenceType = CasConsumerUtil.getType(typeSystem,
sentenceTypeName);
mTokenType = CasConsumerUtil.getType(typeSystem, tokenTypeName);
--
Andreas Niekler, Dipl. Ing. (FH)
NLP Group | Department of Computer Science
University of Leipzig
Johannisgasse 26 | 04103 Leipzig
mail: [email protected]