public class TabReader extends java.lang.Object implements SyntaxGraphReader
Constructor and Description |
---|
TabReader() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
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.
|
java.io.BufferedReader |
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 dataFormatInstance)
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(java.io.BufferedReader reader) |
void |
setSentenceCount(int sentenceCount) |
void |
setUrl(java.net.URL url) |
public TabReader()
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 void readEpilog() throws MaltChainedException
SyntaxGraphReader
readEpilog
in interface SyntaxGraphReader
MaltChainedException
public java.io.BufferedReader getReader()
public void setReader(java.io.BufferedReader reader) throws MaltChainedException
MaltChainedException
public DataFormatInstance getDataFormatInstance()
SyntaxGraphReader
getDataFormatInstance
in interface SyntaxGraphReader
public void setDataFormatInstance(DataFormatInstance dataFormatInstance)
SyntaxGraphReader
setDataFormatInstance
in interface SyntaxGraphReader
dataFormatInstance
- an input data format instancepublic int getSentenceCount() throws MaltChainedException
SyntaxGraphReader
getSentenceCount
in interface SyntaxGraphReader
MaltChainedException
public void setSentenceCount(int sentenceCount)
public 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
public void close() throws MaltChainedException
SyntaxGraphReader
close
in interface SyntaxGraphReader
MaltChainedException
public void clear() throws MaltChainedException
MaltChainedException
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.