public class TigerXMLWriter extends java.lang.Object implements SyntaxGraphWriter
Constructor and Description |
---|
TigerXMLWriter() |
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.
|
int |
getSentenceCount() |
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 |
setSentenceCount(int sentenceCount) |
void |
setWriter(java.io.BufferedWriter writer) |
void |
writeEpilog()
Writes the end of the file
|
void |
writeNonTerminal(SymbolTableHandler symbolTables,
NonTerminalNode nt,
java.lang.String id) |
void |
writeNonTerminals(PhraseStructure phraseStructure) |
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 TigerXMLWriter()
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 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)
public void close() throws MaltChainedException
SyntaxGraphWriter
close
in interface SyntaxGraphWriter
MaltChainedException
public void writeNonTerminals(PhraseStructure phraseStructure) throws MaltChainedException
MaltChainedException
public void writeNonTerminal(SymbolTableHandler symbolTables, NonTerminalNode nt, java.lang.String id) throws MaltChainedException
MaltChainedException
public int getSentenceCount()
public void setSentenceCount(int sentenceCount)
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
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.