public class TcfWriter extends JCasFileWriter_ImplBase
JCasFileWriter_ImplBase.NamedOutputStream
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_FILENAME_EXTENSION
Specify the suffix of output files.
|
static String |
PARAM_MERGE
Merge with source TCF file if one is available.
Default: true |
static String |
PARAM_PRESERVE_IF_EMPTY
If there are no annotations for a particular layer in the CAS, preserve any potentially
existing annotations in the original TCF.
Default: false |
JAR_PREFIX, PARAM_COMPRESSION, PARAM_ESCAPE_DOCUMENT_ID, PARAM_OVERWRITE, PARAM_SINGULAR_TARGET, PARAM_STRIP_EXTENSION, PARAM_TARGET_LOCATION, PARAM_USE_DOCUMENT_ID
Constructor and Description |
---|
TcfWriter() |
Modifier and Type | Method and Description |
---|---|
void |
casToTcfWriter(InputStream aIs,
org.apache.uima.jcas.JCas aJCas,
OutputStream aOs)
Merge annotations from CAS into an existing TCF file.
|
void |
casToTcfWriter(org.apache.uima.jcas.JCas aJCas,
OutputStream aOs)
Create TCF File from scratch
|
void |
initialize(org.apache.uima.UimaContext aContext) |
void |
process(org.apache.uima.jcas.JCas aJCas) |
collectionProcessComplete, getCompressionMethod, getOutputStream, getOutputStream, getRelativePath, getTargetLocation, isStripExtension, isUseDocumentId
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
public static final String PARAM_FILENAME_EXTENSION
.tcf
. If the suffix is not
needed, provide an empty string as value.public static final String PARAM_PRESERVE_IF_EMPTY
false
public static final String PARAM_MERGE
true
public void initialize(org.apache.uima.UimaContext aContext) throws org.apache.uima.resource.ResourceInitializationException
initialize
in interface org.apache.uima.analysis_component.AnalysisComponent
initialize
in class org.apache.uima.fit.component.JCasConsumer_ImplBase
org.apache.uima.resource.ResourceInitializationException
public void process(org.apache.uima.jcas.JCas aJCas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process
in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
org.apache.uima.analysis_engine.AnalysisEngineProcessException
public void casToTcfWriter(org.apache.uima.jcas.JCas aJCas, OutputStream aOs) throws eu.clarin.weblicht.wlfxb.io.WLFormatException
aJCas
- the JCas.aOs
- the output stream.eu.clarin.weblicht.wlfxb.io.WLFormatException
- if a TCF problem occurs.public void casToTcfWriter(InputStream aIs, org.apache.uima.jcas.JCas aJCas, OutputStream aOs) throws eu.clarin.weblicht.wlfxb.io.WLFormatException
aIs
- the TCF file with an existing annotation layersaJCas
- an annotated CAS objectaOs
- the output stream.eu.clarin.weblicht.wlfxb.io.WLFormatException
- if a TCF problem occurs.Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.