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() |
java.lang.String |
getOptions()
Returns a string representation of the reader specific options.
|
int |
getSentenceCount()
Returns the current number of the sentence.
|
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 |
setDataFormatInstance(DataFormatInstance dataFormatInstance)
Sets the input data format instance
|
void |
setNIterations(int iterations) |
void |
setOptions(java.lang.String optionString)
Sets the reader specific options.
|
void open(java.lang.String fileName, java.lang.String charsetName) throws MaltChainedException
fileName - the file name of the filecharsetName - the name of the character encoding setMaltChainedExceptionvoid open(java.net.URL url, java.lang.String charsetName) throws MaltChainedException
url - the URL of the resourcecharsetName - the name of the character encoding setMaltChainedExceptionvoid open(java.io.InputStream is, java.lang.String charsetName) throws MaltChainedException
is - an input streamcharsetName - the name of the character encoding setMaltChainedExceptionvoid readProlog() throws MaltChainedException
MaltChainedExceptionboolean readSentence(TokenStructure syntaxGraph) throws MaltChainedException
syntaxGraph - a syntax graph (token structure, dependency structure or/and phrase structure)MaltChainedExceptionvoid readEpilog() throws MaltChainedException
MaltChainedExceptionint getSentenceCount() throws MaltChainedException
MaltChainedExceptionDataFormatInstance getDataFormatInstance()
void setDataFormatInstance(DataFormatInstance dataFormatInstance)
dataFormatInstance - an input data format instancejava.lang.String getOptions()
void setOptions(java.lang.String optionString) throws MaltChainedException
optionString - a string representation of the reader specific optionsMaltChainedExceptionvoid close() throws MaltChainedException
MaltChainedExceptionint getNIterations()
void setNIterations(int iterations)
int getIterationCounter()
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.