public interface SyntaxGraphWriter
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the file or the output stream.
|
DataFormatInstance |
getDataFormatInstance()
Returns the output data format instance
|
String |
getOptions()
Returns a string representation of the writer specific options.
|
void |
open(OutputStream os,
String charsetName)
Opens an output stream
|
void |
open(String fileName,
String charsetName)
Opens a file for writing
|
void |
setDataFormatInstance(DataFormatInstance dataFormatInstance)
Sets the output data format instance
|
void |
setOptions(String optionString)
Sets the writer specific options.
|
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)
|
void open(String fileName, String charsetName) throws MaltChainedException
fileName
- the file name of the filecharsetName
- the name of the character encoding setMaltChainedException
void open(OutputStream os, String charsetName) throws MaltChainedException
os
- an output streamcharsetName
- the name of the character encoding setMaltChainedException
void writeProlog() throws MaltChainedException
MaltChainedException
void writeSentence(TokenStructure syntaxGraph) throws MaltChainedException
syntaxGraph
- a syntax graph (token structure, dependency structure or/and phrase structure)MaltChainedException
void writeEpilog() throws MaltChainedException
MaltChainedException
DataFormatInstance getDataFormatInstance()
void setDataFormatInstance(DataFormatInstance dataFormatInstance)
dataFormatInstance
- an output data format instanceString getOptions()
void setOptions(String optionString) throws MaltChainedException
optionString
- a string representation of the writer specific optionsMaltChainedException
void close() throws MaltChainedException
MaltChainedException
Copyright 2007-2014 Johan Hall, Jens Nilsson and Joakim Nivre.