public abstract class Chunking_ImplBase<SUB_CHUNK_TYPE extends Annotation,CHUNK_TYPE extends Annotation> extends Object implements Chunking<String,SUB_CHUNK_TYPE,CHUNK_TYPE>
| Modifier and Type | Field and Description |
|---|---|
protected Class<? extends CHUNK_TYPE> |
chunkClass |
protected String |
featureFullName |
protected Class<? extends SUB_CHUNK_TYPE> |
subChunkClass |
| Constructor and Description |
|---|
Chunking_ImplBase(Class<? extends SUB_CHUNK_TYPE> subChunkClass,
Class<? extends CHUNK_TYPE> chunkClass,
String featureName) |
| Modifier and Type | Method and Description |
|---|---|
List<CHUNK_TYPE> |
createChunks(JCas jCas,
List<SUB_CHUNK_TYPE> subChunks,
List<String> outcomes) |
List<String> |
createOutcomes(JCas jCas,
List<SUB_CHUNK_TYPE> subChunks,
List<CHUNK_TYPE> chunks) |
protected Feature |
getFeature(JCas jCas) |
protected String |
getOutcomeSuffix(CHUNK_TYPE chunk,
Feature feature) |
protected abstract Map<SUB_CHUNK_TYPE,String> |
getSubChunkToOutcomeMap(JCas jCas,
List<SUB_CHUNK_TYPE> subChunks,
List<CHUNK_TYPE> chunks)
Produce a map from sub-chunk annotations to their outcome prefixes (e.g.
|
protected abstract boolean |
isEndOfChunk(char currPrefix,
String currLabel,
char nextPrefix,
String nextLabel)
Determines whether the current outcome represents the end of a chunk.
|
protected Class<? extends CHUNK_TYPE extends Annotation> chunkClass
protected String featureFullName
protected Class<? extends SUB_CHUNK_TYPE extends Annotation> subChunkClass
public Chunking_ImplBase(Class<? extends SUB_CHUNK_TYPE> subChunkClass, Class<? extends CHUNK_TYPE> chunkClass, String featureName)
public List<CHUNK_TYPE> createChunks(JCas jCas, List<SUB_CHUNK_TYPE> subChunks, List<String> outcomes) throws AnalysisEngineProcessException
createChunks in interface Chunking<String,SUB_CHUNK_TYPE extends Annotation,CHUNK_TYPE extends Annotation>AnalysisEngineProcessExceptionpublic List<String> createOutcomes(JCas jCas, List<SUB_CHUNK_TYPE> subChunks, List<CHUNK_TYPE> chunks) throws AnalysisEngineProcessException
createOutcomes in interface Chunking<String,SUB_CHUNK_TYPE extends Annotation,CHUNK_TYPE extends Annotation>AnalysisEngineProcessExceptionprotected Feature getFeature(JCas jCas)
protected String getOutcomeSuffix(CHUNK_TYPE chunk, Feature feature)
protected abstract Map<SUB_CHUNK_TYPE,String> getSubChunkToOutcomeMap(JCas jCas, List<SUB_CHUNK_TYPE> subChunks, List<CHUNK_TYPE> chunks)
subChunks - The sub-annotations that make up the chunks.chunks - The chunk annotations.protected abstract boolean isEndOfChunk(char currPrefix, String currLabel, char nextPrefix, String nextLabel)
currPrefix - The prefix of the current outcomecurrLabel - The label of the current outcomenextPrefix - The prefix of the following outcomenextLabel - The label of the following outcomeCopyright © 2014. All rights reserved.