public final class PrettyTextWriter extends Object
Constructor and Description |
---|
PrettyTextWriter() |
Modifier and Type | Method and Description |
---|---|
void |
process(org.apache.uima.jcas.JCas jcas)
Process the jcas and write pretty sentences to file.
|
void |
setOutputDirectory(String outputDirectoryPath) |
void |
writeFile(org.apache.uima.jcas.JCas jCas,
String outputFilePath) |
static void |
writeSentence(org.apache.uima.jcas.JCas jcas,
org.apache.uima.cas.text.AnnotationFS sentence,
BufferedWriter writer)
Write a sentence from the document text
|
public void setOutputDirectory(String outputDirectoryPath) throws IllegalArgumentException, SecurityException
outputDirectoryPath
- may be empty or null, in which case the current working directory is usedIllegalArgumentException
- if the provided path points to a File and not a DirectorySecurityException
- if the File System has issuespublic void process(org.apache.uima.jcas.JCas jcas)
jcas
- ye olde ...public void writeFile(org.apache.uima.jcas.JCas jCas, String outputFilePath)
public static void writeSentence(org.apache.uima.jcas.JCas jcas, org.apache.uima.cas.text.AnnotationFS sentence, BufferedWriter writer) throws IOException
jcas
- ye olde ...sentence
- annotation containing the sentencewriter
- writer to which pretty text for the sentence should be writtenIOException
- if the writer has issuesCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.