public interface SyntaxGraphReader
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the file or the input stream.
|
DataFormatInstance |
getDataFormatInstance()
Returns the input data format instance
|
int |
getIterationCounter() |
int |
getNIterations() |
String |
getOptions()
Returns a string representation of the reader specific options.
|
int |
getSentenceCount()
Returns the current number of the sentence.
|
void |
open(InputStream is,
String charsetName)
Opens an input stream
|
void |
open(String fileName,
String charsetName)
Opens a file for read only
|
void |
open(URL url,
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 |
setDataFormatInstance(DataFormatInstance dataFormatInstance)
Sets the input data format instance
|
void |
setNIterations(int iterations) |
void |
setOptions(String optionString)
Sets the reader specific options.
|
void open(String fileName, String charsetName) throws MaltChainedException
fileName
- the file name of the filecharsetName
- the name of the character encoding setMaltChainedException
void open(URL url, String charsetName) throws MaltChainedException
url
- the URL of the resourcecharsetName
- the name of the character encoding setMaltChainedException
void open(InputStream is, String charsetName) throws MaltChainedException
is
- an input streamcharsetName
- the name of the character encoding setMaltChainedException
void readProlog() throws MaltChainedException
MaltChainedException
boolean readSentence(TokenStructure syntaxGraph) throws MaltChainedException
syntaxGraph
- a syntax graph (token structure, dependency structure or/and phrase structure)MaltChainedException
void readEpilog() throws MaltChainedException
MaltChainedException
int getSentenceCount() throws MaltChainedException
MaltChainedException
DataFormatInstance getDataFormatInstance()
void setDataFormatInstance(DataFormatInstance dataFormatInstance)
dataFormatInstance
- an input data format instanceString getOptions()
void setOptions(String optionString) throws MaltChainedException
optionString
- a string representation of the reader specific optionsMaltChainedException
void close() throws MaltChainedException
MaltChainedException
int getNIterations()
void setNIterations(int iterations)
int getIterationCounter()
Copyright 2007-2014 Johan Hall, Jens Nilsson and Joakim Nivre.