|
ABL4J (Alignment Based Learning for Java) - 0.9.7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.schwiebert.abl4j.io.TreebankReader
public class TreebankReader
Helper class for IO Operations.
| Field Summary | |
|---|---|
private boolean |
doClose
|
private boolean |
ignoreAnnotations
|
private int |
indexInCurrentLine
|
private Reader |
reader
|
| Constructor Summary | |
|---|---|
TreebankReader()
|
|
| Method Summary | |
|---|---|
void |
configure(PropertiesMap pm)
|
private void |
readProbability(IConstituent cons,
String prob)
|
private void |
readSentence(ITree t,
String currentLine)
Parses the words of a sentence from String currentLine and adds
the information to ITree t. |
private void |
readSequenceScore(ITree t,
String line)
|
private void |
readStructure(ITree t,
String line)
Parses the structure of a ITree from String line. |
private ITree |
readTree(BufferedReader is)
Parses a ITree from content provided by a reader. |
void |
readTreebank(ITreeBank tb)
Fills a ITreeBank from content provided by a Reader. |
private IWord |
readWord(String currentLine)
Parses a single IWord from String currentLine. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int indexInCurrentLine
private Reader reader
private boolean doClose
private boolean ignoreAnnotations
| Constructor Detail |
|---|
public TreebankReader()
| Method Detail |
|---|
public void configure(PropertiesMap pm)
throws InvalidConfigurationException
configure in interface IConfigurableInvalidConfigurationException
public void readTreebank(ITreeBank tb)
throws IOException
ITreeBank from content provided by a Reader.
readTreebank in interface ITreebankReadertb -
IOException
private ITree readTree(BufferedReader is)
throws IOException
ITree from content provided by a reader. The content
must be formatted in ABL- or ABL4J-syntax.
is - the reader
IOException - if an IO-Error occurs while reading from is.
private void readSequenceScore(ITree t,
String line)
private void readStructure(ITree t,
String line)
ITree from String line.
The (constituent-) structure must be formatted in ABL- or ABL4J-syntax.
t - The tree that will be enriched with structural informationline - The structural information to parse
private void readProbability(IConstituent cons,
String prob)
private void readSentence(ITree t,
String currentLine)
currentLine and adds
the information to ITree t.
t - the treecurrentLine - private IWord readWord(String currentLine)
IWord from String currentLine.
The parsed Word is registered within an instance of WordMapping.
currentLine - the String which contains the ISentence.
null if the current line is empty or already parsed, or if the sentence delimiter @@@ was found.for details.
|
ABL4J (Alignment Based Learning for Java) - 0.9.7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||