@PipeBitInfo(name="Pretty Text Writer", description="Writes text files with document text and simple markups (POS, Semantic Group, CUI, Negation).", role=WRITER, dependencies={DOCUMENT_ID,SENTENCE,BASE_TOKEN}, usables={DOCUMENT_ID_PREFIX,IDENTIFIED_ANNOTATION,EVENT,TIMEX,TEMPORAL_RELATION}) public final class PrettyTextWriterFit extends AbstractOutputFileWriter
ConfigurationParameter
It cannot be used in the old Uima CPE style (e.g. the Uima CPE Gui) as the Uima CPE has problems with Fit Consumers.
There is a version that can be used with the CPE GUI:
PrettyTextWriterUima
PrettyTextWriter
Constructor and Description |
---|
PrettyTextWriterFit() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(org.apache.uima.UimaContext uimaContext) |
void |
writeFile(org.apache.uima.jcas.JCas jCas,
String outputDir,
String documentId,
String fileName)
Write information into a file named based upon the document id and located based upon the document id prefix.
|
getOutputDirectory, getSourceFileName, getSourceFilePath, getSubdirectory, process
getRequiredCasInterface, process, typeSystemInit
getCasInstancesRequired, hasNext, next
public void writeFile(org.apache.uima.jcas.JCas jCas, String outputDir, String documentId, String fileName) throws IOException
writeFile
in class AbstractOutputFileWriter
jCas
- ye oldeoutputDir
- output directorydocumentId
- some id for the cas documentfileName
- name for the output fileIOException
- if anything goes wrongpublic void initialize(org.apache.uima.UimaContext uimaContext) throws org.apache.uima.resource.ResourceInitializationException
initialize
in interface org.apache.uima.analysis_component.AnalysisComponent
initialize
in class AbstractOutputFileWriter
org.apache.uima.resource.ResourceInitializationException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.