@Beta public class ParserAnnotator<TOKEN_TYPE extends Annotation,SENTENCE_TYPE extends Annotation,TOP_NODE_TYPE extends Annotation> extends ParserWrapper_ImplBase<TOKEN_TYPE,SENTENCE_TYPE,Parse,TOP_NODE_TYPE>
InputTypesHelper and OutputTypesHelper you can use your own
types for sentences, tokens, and part-of-speech tags.
The default behavior of the OpenNLP chunking parser is to perform part-of-speech tagging in
addition to syntactic parsing. This may not be desirable in some situations where you have
already populated the CAS with part-of-speech tags. In such cases you can set the configuration
parameter with the name PARAM_USE_TAGS_FROM_CAS to "true". This will bypass the
OpenNLP's part-of-speech tagger and instead use tags from the CAS as defined by the
implementation of InputTypesHelper you are using.
| Modifier and Type | Field and Description |
|---|---|
protected CasPosTagger<TOKEN_TYPE,SENTENCE_TYPE> |
casTagger |
static float |
DEFAULT_ADVANCE_PERCENTAGE |
static int |
DEFAULT_BEAM_SIZE |
static String |
DEFAULT_PARSER_MODEL_PATH |
static String |
PARAM_ADVANCE_PERCENTAGE |
static String |
PARAM_BEAM_SIZE |
static String |
PARAM_PARSER_MODEL_PATH |
static String |
PARAM_USE_TAGS_FROM_CAS |
protected Parser |
parser |
inputTypesHelper, inputTypesHelperClassName, outputTypesHelper, outputTypesHelperClassName, PARAM_INPUT_TYPES_HELPER_CLASS_NAME, PARAM_OUTPUT_TYPES_HELPER_CLASS_NAME| Constructor and Description |
|---|
ParserAnnotator() |
| Modifier and Type | Method and Description |
|---|---|
static AnalysisEngineDescription |
getDescription() |
void |
initialize(UimaContext ctx) |
void |
process(JCas jCas) |
protected void |
setPOSTags(Parse p,
Iterator<TOKEN_TYPE> tokenIterator,
JCas view) |
getLoggergetRequiredCasInterface, processgetCasInstancesRequired, hasNext, nextbatchProcessComplete, collectionProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecificationprotected CasPosTagger<TOKEN_TYPE extends Annotation,SENTENCE_TYPE extends Annotation> casTagger
public static final float DEFAULT_ADVANCE_PERCENTAGE
public static final int DEFAULT_BEAM_SIZE
public static final String DEFAULT_PARSER_MODEL_PATH
public static final String PARAM_ADVANCE_PERCENTAGE
public static final String PARAM_BEAM_SIZE
public static final String PARAM_PARSER_MODEL_PATH
public static final String PARAM_USE_TAGS_FROM_CAS
public ParserAnnotator()
public static AnalysisEngineDescription getDescription() throws ResourceInitializationException
ResourceInitializationExceptionpublic void initialize(UimaContext ctx) throws ResourceInitializationException
initialize in interface AnalysisComponentinitialize in class ParserWrapper_ImplBase<TOKEN_TYPE extends Annotation,SENTENCE_TYPE extends Annotation,Parse,TOP_NODE_TYPE extends Annotation>ResourceInitializationExceptionpublic void process(JCas jCas) throws AnalysisEngineProcessException
process in class JCasAnnotator_ImplBaseAnalysisEngineProcessExceptionprotected void setPOSTags(Parse p, Iterator<TOKEN_TYPE> tokenIterator, JCas view)
Copyright © 2014. All rights reserved.