public class TigerXMLReader extends java.lang.Object implements SyntaxGraphReader
Constructor and Description |
---|
TigerXMLReader() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the file or the input stream.
|
java.lang.String |
getCharsetName() |
DataFormatInstance |
getDataFormatInstance()
Returns the input data format instance
|
java.lang.String |
getFileName() |
int |
getIterationCounter() |
int |
getNIterations() |
java.lang.String |
getOptions()
Returns a string representation of the reader specific options.
|
javax.xml.stream.XMLStreamReader |
getReader() |
int |
getSentenceCount()
Returns the current number of the sentence.
|
java.net.URL |
getUrl() |
void |
open(java.io.InputStream is,
java.lang.String charsetName)
Opens an input stream
|
void |
open(java.lang.String fileName,
java.lang.String charsetName)
Opens a file for read only
|
void |
open(java.net.URL url,
java.lang.String charsetName)
Opens an URL for read only
|
void |
readEpilog()
Reads the end of the file, after all sentences have been processed,
|
void |
readProlog()
Cause the syntax graph reader to read the beginning of the file (such as header information)
|
boolean |
readSentence(TokenStructure syntaxGraph)
Reads a sentence (token structure, dependency structure or/and phrase structure)
|
void |
setCharsetName(java.lang.String charsetName) |
void |
setDataFormatInstance(DataFormatInstance inputDataFormatInstance)
Sets the input data format instance
|
void |
setFileName(java.lang.String fileName) |
void |
setNIterations(int iterations) |
void |
setOptions(java.lang.String optionString)
Sets the reader specific options.
|
void |
setReader(javax.xml.stream.XMLStreamReader reader) |
void |
setSentenceCount(int sentenceCount) |
void |
setUrl(java.net.URL url) |
public TigerXMLReader()
public void open(java.lang.String fileName, java.lang.String charsetName) throws MaltChainedException
SyntaxGraphReader
open
in interface SyntaxGraphReader
fileName
- the file name of the filecharsetName
- the name of the character encoding setMaltChainedException
public void open(java.net.URL url, java.lang.String charsetName) throws MaltChainedException
SyntaxGraphReader
open
in interface SyntaxGraphReader
url
- the URL of the resourcecharsetName
- the name of the character encoding setMaltChainedException
public void open(java.io.InputStream is, java.lang.String charsetName) throws MaltChainedException
SyntaxGraphReader
open
in interface SyntaxGraphReader
is
- an input streamcharsetName
- the name of the character encoding setMaltChainedException
public void readProlog() throws MaltChainedException
SyntaxGraphReader
readProlog
in interface SyntaxGraphReader
MaltChainedException
public boolean readSentence(TokenStructure syntaxGraph) throws MaltChainedException
SyntaxGraphReader
readSentence
in interface SyntaxGraphReader
syntaxGraph
- a syntax graph (token structure, dependency structure or/and phrase structure)MaltChainedException
public int getSentenceCount()
SyntaxGraphReader
getSentenceCount
in interface SyntaxGraphReader
public void setSentenceCount(int sentenceCount)
public javax.xml.stream.XMLStreamReader getReader()
public void setReader(javax.xml.stream.XMLStreamReader reader)
public void readEpilog() throws MaltChainedException
SyntaxGraphReader
readEpilog
in interface SyntaxGraphReader
MaltChainedException
public void close() throws MaltChainedException
SyntaxGraphReader
close
in interface SyntaxGraphReader
MaltChainedException
public DataFormatInstance getDataFormatInstance()
SyntaxGraphReader
getDataFormatInstance
in interface SyntaxGraphReader
public void setDataFormatInstance(DataFormatInstance inputDataFormatInstance)
SyntaxGraphReader
setDataFormatInstance
in interface SyntaxGraphReader
inputDataFormatInstance
- an input data format instancepublic java.lang.String getOptions()
SyntaxGraphReader
getOptions
in interface SyntaxGraphReader
public void setOptions(java.lang.String optionString) throws MaltChainedException
SyntaxGraphReader
setOptions
in interface SyntaxGraphReader
optionString
- a string representation of the reader specific optionsMaltChainedException
public java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
public java.net.URL getUrl()
public void setUrl(java.net.URL url)
public java.lang.String getCharsetName()
public void setCharsetName(java.lang.String charsetName)
public int getNIterations()
getNIterations
in interface SyntaxGraphReader
public void setNIterations(int iterations)
setNIterations
in interface SyntaxGraphReader
public int getIterationCounter()
getIterationCounter
in interface SyntaxGraphReader
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.