org.cleartk.berkeleyparser.ParserWrapper_ImplBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleartk-berkeleyparser Show documentation
Show all versions of cleartk-berkeleyparser Show documentation
ClearTK wrapper for the Berkeley parser
/*
* Copyright (c) 2012, Regents of the University of Colorado
* All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a complete copy of the license please see the file LICENSE distributed
* with the cleartk-syntax-berkeley project or visit
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
*/
package org.cleartk.berkeleyparser;
import org.apache.uima.UimaContext;
import org.apache.uima.jcas.tcas.Annotation;
import org.apache.uima.resource.ResourceInitializationException;
import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
import org.apache.uima.fit.descriptor.ConfigurationParameter;
import org.apache.uima.fit.factory.initializable.InitializableFactory;
/**
*
* Copyright (c) 2012, Regents of the University of Colorado
* All rights reserved.
*/
public abstract class ParserWrapper_ImplBase
extends JCasAnnotator_ImplBase {
public static final String PARAM_INPUT_TYPES_HELPER_CLASS_NAME = "inputTypesHelperClassName";
@ConfigurationParameter(
name = PARAM_INPUT_TYPES_HELPER_CLASS_NAME,
defaultValue = "org.cleartk.berkeleyparser.DefaultInputTypesHelper",
mandatory = true)
protected String inputTypesHelperClassName;
protected InputTypesHelper inputTypesHelper;
public static final String PARAM_OUTPUT_TYPES_HELPER_CLASS_NAME = "outputTypesHelperClassName";
@ConfigurationParameter(mandatory = true, name = PARAM_OUTPUT_TYPES_HELPER_CLASS_NAME)
protected String outputTypesHelperClassName;
protected OutputTypesHelper outputTypesHelper;
@SuppressWarnings("unchecked")
@Override
public void initialize(UimaContext ctx) throws ResourceInitializationException {
super.initialize(ctx);
inputTypesHelper = InitializableFactory.create(
ctx,
inputTypesHelperClassName,
InputTypesHelper.class);
outputTypesHelper = InitializableFactory.create(
ctx,
outputTypesHelperClassName,
OutputTypesHelper.class);
}
}