public class TabWriter extends java.lang.Object implements SyntaxGraphWriter
Constructor and Description |
---|
TabWriter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the file or the output stream.
|
DataFormatInstance |
getDataFormatInstance()
Returns the output data format instance
|
java.lang.String |
getOptions()
Returns a string representation of the writer specific options.
|
java.io.BufferedWriter |
getWriter() |
void |
open(java.io.OutputStream os,
java.lang.String charsetName)
Opens an output stream
|
void |
open(java.lang.String fileName,
java.lang.String charsetName)
Opens a file for writing
|
void |
setDataFormatInstance(DataFormatInstance dataFormatInstance)
Sets the output data format instance
|
void |
setOptions(java.lang.String optionString)
Sets the writer specific options.
|
void |
setWriter(java.io.BufferedWriter writer) |
void |
writeComments(TokenStructure syntaxGraph,
int at_index) |
void |
writeEpilog()
Writes the end of the file
|
void |
writeProlog()
Cause the syntax graph writer to write the beginning of the file (such as header information)
|
void |
writeSentence(TokenStructure syntaxGraph)
Writes a sentence (token structure, dependency structure or/and phrase structure)
|
public TabWriter()
public void open(java.lang.String fileName, java.lang.String charsetName) throws MaltChainedException
SyntaxGraphWriter
open
in interface SyntaxGraphWriter
fileName
- the file name of the filecharsetName
- the name of the character encoding setMaltChainedException
public void open(java.io.OutputStream os, java.lang.String charsetName) throws MaltChainedException
SyntaxGraphWriter
open
in interface SyntaxGraphWriter
os
- an output streamcharsetName
- the name of the character encoding setMaltChainedException
public void writeProlog() throws MaltChainedException
SyntaxGraphWriter
writeProlog
in interface SyntaxGraphWriter
MaltChainedException
public void writeComments(TokenStructure syntaxGraph, int at_index) throws MaltChainedException
MaltChainedException
public void writeSentence(TokenStructure syntaxGraph) throws MaltChainedException
SyntaxGraphWriter
writeSentence
in interface SyntaxGraphWriter
syntaxGraph
- a syntax graph (token structure, dependency structure or/and phrase structure)MaltChainedException
public void writeEpilog() throws MaltChainedException
SyntaxGraphWriter
writeEpilog
in interface SyntaxGraphWriter
MaltChainedException
public java.io.BufferedWriter getWriter()
public void setWriter(java.io.BufferedWriter writer) throws MaltChainedException
MaltChainedException
public DataFormatInstance getDataFormatInstance()
SyntaxGraphWriter
getDataFormatInstance
in interface SyntaxGraphWriter
public void setDataFormatInstance(DataFormatInstance dataFormatInstance)
SyntaxGraphWriter
setDataFormatInstance
in interface SyntaxGraphWriter
dataFormatInstance
- an output data format instancepublic java.lang.String getOptions()
SyntaxGraphWriter
getOptions
in interface SyntaxGraphWriter
public void setOptions(java.lang.String optionString) throws MaltChainedException
SyntaxGraphWriter
setOptions
in interface SyntaxGraphWriter
optionString
- a string representation of the writer specific optionsMaltChainedException
public void close() throws MaltChainedException
SyntaxGraphWriter
close
in interface SyntaxGraphWriter
MaltChainedException
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.