@Override public void typeSystemInit(TypeSystem typeSystem) throws AnalysisEngineProcessException { super.typeSystemInit(typeSystem); sentenceType = AnnotatorUtil.getRequiredTypeParameter(context, typeSystem, UimaUtil.SENTENCE_TYPE_PARAMETER); tokenType = AnnotatorUtil.getRequiredTypeParameter(context, typeSystem, UimaUtil.TOKEN_TYPE_PARAMETER); }
@Override public void typeSystemInit(TypeSystem typeSystem) throws AnalysisEngineProcessException { super.typeSystemInit(typeSystem); containerType = AnnotatorUtil.getOptionalTypeParameter(context, typeSystem, "opennlp.uima.ContainerType"); if (containerType == null) { containerType = typeSystem.getType(CAS.TYPE_NAME_DOCUMENT_ANNOTATION); } sentenceType = AnnotatorUtil.getRequiredTypeParameter(context, typeSystem, UimaUtil.SENTENCE_TYPE_PARAMETER); }
/** * Checks it the type system of the given CAS is different from the last type system this * component was operating on. If it is different, calls the typeSystemInit method on the * component. */ private void checkTypeSystemChange(CAS aCAS) throws AnalysisEngineProcessException { TypeSystem typeSystem = aCAS.getTypeSystem(); if (typeSystem != mLastTypeSystem) { typeSystemInit(typeSystem); mLastTypeSystem = typeSystem; } } }
@Override public void typeSystemInit(TypeSystem typeSystem) throws AnalysisEngineProcessException { super.typeSystemInit(typeSystem); sentenceType = AnnotatorUtil.getRequiredTypeParameter(context, typeSystem, UimaUtil.SENTENCE_TYPE_PARAMETER); tokenType = AnnotatorUtil.getRequiredTypeParameter(context, typeSystem, UimaUtil.TOKEN_TYPE_PARAMETER); }
@Override public void typeSystemInit(TypeSystem typeSystem) throws AnalysisEngineProcessException { super.typeSystemInit(typeSystem); containerType = AnnotatorUtil.getOptionalTypeParameter(context, typeSystem, "opennlp.uima.ContainerType"); if (containerType == null) { containerType = typeSystem.getType(CAS.TYPE_NAME_DOCUMENT_ANNOTATION); } sentenceType = AnnotatorUtil.getRequiredTypeParameter(context, typeSystem, UimaUtil.SENTENCE_TYPE_PARAMETER); }
public void typeSystemInit(TypeSystem typeSystem) throws AnalysisEngineProcessException { super.typeSystemInit(typeSystem);
@Override public void typeSystemInit(TypeSystem ts) throws AnalysisEngineProcessException { super.typeSystemInit(ts); String idTypeName = (String) getContext().getConfigParameterValue("IdFSTypeName"); idType = ts.getType(idTypeName); String idFeatureName = (String) getContext().getConfigParameterValue("IdFeatureName"); idFeature = idType.getFeatureByBaseName(idFeatureName); }