public class PrintStreamAdornedWordOutputter extends java.lang.Object implements AdornedWordOutputter
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
fileEncoding
Output file encoding.
|
protected java.lang.String |
fileName
Output file name.
|
protected java.io.PrintStream |
printStream
PrintStream for console output.
|
protected char |
separatorCharacter
Separator character for output.
|
protected java.lang.String[] |
wordAttributeNames
Word attribute names.
|
| Constructor and Description |
|---|
PrintStreamAdornedWordOutputter()
Create outputter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close outputter.
|
void |
createOutputFile(java.lang.String fileName,
java.lang.String encoding,
char separatorCharacter)
Create output file.
|
java.lang.String |
getOutputFileEncoding()
Get output file encoding.
|
java.lang.String |
getOutputFileName()
Get output file name.
|
void |
outputWordAndAdornments(java.util.List<java.lang.String> wordAndAdornments)
Outputs a word and its adornments (part of speech, lemmata, etc).
|
void |
outputWordAndAdornments(java.lang.String[] wordAndAdornments)
Outputs a word and its adornments (part of speech, lemmata, etc).
|
void |
setWordAttributeNames(java.util.List<java.lang.String> wordAttributeNames)
Set word attribute names.
|
protected java.io.PrintStream printStream
protected char separatorCharacter
protected java.lang.String fileName
protected java.lang.String fileEncoding
protected java.lang.String[] wordAttributeNames
public PrintStreamAdornedWordOutputter()
public void createOutputFile(java.lang.String fileName,
java.lang.String encoding,
char separatorCharacter)
throws java.io.IOException
createOutputFile in interface AdornedWordOutputterfileName - Output file name.encoding - Encoding for the output file.separatorCharacter - Output separator character.java.io.IOExceptionpublic void setWordAttributeNames(java.util.List<java.lang.String> wordAttributeNames)
setWordAttributeNames in interface AdornedWordOutputterwordAttributeNames - Word attribute names.public void outputWordAndAdornments(java.lang.String[] wordAndAdornments)
throws java.io.IOException
outputWordAndAdornments in interface AdornedWordOutputterwordAndAdornments - Word and its adornments as an
array of string.java.io.IOException - If an output error occurs.
Outputs word and adornments as a tab-separated text line to a print stream.
public void outputWordAndAdornments(java.util.List<java.lang.String> wordAndAdornments)
throws java.io.IOException
outputWordAndAdornments in interface AdornedWordOutputterwordAndAdornments - Word and its adornments as a list
of strings.java.io.IOException - If an output error occurs.
Outputs word and adornments as a tab-separated text line to a print stream.
public java.lang.String getOutputFileName()
getOutputFileName in interface AdornedWordOutputterpublic java.lang.String getOutputFileEncoding()
getOutputFileEncoding in interface AdornedWordOutputterpublic void close()
close in interface AdornedWordOutputter