public class ListAdornedWordOutputter extends java.lang.Object implements AdornedWordOutputter
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.util.List<java.lang.String>> |
adornedWordDataList
List holding adorned word output.
|
protected java.lang.String |
fileEncoding
Output file encoding.
|
protected java.lang.String |
fileName
Output file name.
|
protected char |
separatorCharacter
Separator character for output.
|
Constructor and Description |
---|
ListAdornedWordOutputter()
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.util.List<java.util.List<java.lang.String>> |
getAdornedWordDataList()
Get list of adorned word output.
|
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.util.List<java.util.List<java.lang.String>> adornedWordDataList
protected char separatorCharacter
protected java.lang.String fileName
protected java.lang.String fileEncoding
public void createOutputFile(java.lang.String fileName, java.lang.String encoding, char separatorCharacter) throws java.io.IOException
createOutputFile
in interface AdornedWordOutputter
fileName
- Output file name.encoding
- Encoding for the output file.separatorCharacter
- Output separator character.
The unused arguments are stored but otherwise ignored.
java.io.IOException
public void setWordAttributeNames(java.util.List<java.lang.String> wordAttributeNames)
setWordAttributeNames
in interface AdornedWordOutputter
wordAttributeNames
- Word attribute names.public void outputWordAndAdornments(java.lang.String[] wordAndAdornments) throws java.io.IOException
outputWordAndAdornments
in interface AdornedWordOutputter
wordAndAdornments
- 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 standard output.
public void outputWordAndAdornments(java.util.List<java.lang.String> wordAndAdornments) throws java.io.IOException
outputWordAndAdornments
in interface AdornedWordOutputter
wordAndAdornments
- Word and its adornments as a
string list.java.io.IOException
- If an output error occurs.
Outputs word and adornments as a tab-separated text line to standard output.
public java.lang.String getOutputFileName()
getOutputFileName
in interface AdornedWordOutputter
public java.lang.String getOutputFileEncoding()
getOutputFileEncoding
in interface AdornedWordOutputter
public void close()
close
in interface AdornedWordOutputter
public java.util.List<java.util.List<java.lang.String>> getAdornedWordDataList()