ABL4J (Alignment Based Learning for Java) - 0.9.7

org.schwiebert.abl4j.io
Class PlainTextSerializationVisitor

java.lang.Object
  extended by org.schwiebert.abl4j.io.PlainTextSerializationVisitor
All Implemented Interfaces:
ISerializationVisitor

public class PlainTextSerializationVisitor
extends Object
implements ISerializationVisitor


Field Summary
private  boolean printConstituentScore
           
private  boolean printSentenceId
           
private  boolean printSentenceScore
           
private  Writer writer
           
 
Constructor Summary
PlainTextSerializationVisitor()
           
 
Method Summary
 void close()
           
 void initialize(Writer writer, Properties properties)
           
 void visitConstituent(IConstituent c, boolean begin)
           
 void visitNonTerminal(NonTerminal nonTerminal, boolean hasNext)
           
 void visitSentence(ISentence sentence)
           
 void visitTree(ITree tree, boolean begin)
           
 void visitTreeBank(ITreeBank<?> treebank)
           
 void visitWord(IWord word, boolean hasNext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

private Writer writer

printConstituentScore

private boolean printConstituentScore

printSentenceId

private boolean printSentenceId

printSentenceScore

private boolean printSentenceScore
Constructor Detail

PlainTextSerializationVisitor

public PlainTextSerializationVisitor()
Method Detail

initialize

public void initialize(Writer writer,
                       Properties properties)
                throws IOException
Specified by:
initialize in interface ISerializationVisitor
Throws:
IOException

visitConstituent

public void visitConstituent(IConstituent c,
                             boolean begin)
                      throws IOException
Specified by:
visitConstituent in interface ISerializationVisitor
Throws:
IOException

visitNonTerminal

public void visitNonTerminal(NonTerminal nonTerminal,
                             boolean hasNext)
                      throws IOException
Specified by:
visitNonTerminal in interface ISerializationVisitor
Throws:
IOException

visitSentence

public void visitSentence(ISentence sentence)
                   throws IOException
Specified by:
visitSentence in interface ISerializationVisitor
Throws:
IOException

visitTree

public void visitTree(ITree tree,
                      boolean begin)
               throws IOException
Specified by:
visitTree in interface ISerializationVisitor
Throws:
IOException

visitTreeBank

public void visitTreeBank(ITreeBank<?> treebank)
                   throws IOException
Specified by:
visitTreeBank in interface ISerializationVisitor
Throws:
IOException

visitWord

public void visitWord(IWord word,
                      boolean hasNext)
               throws IOException
Specified by:
visitWord in interface ISerializationVisitor
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface ISerializationVisitor
Throws:
IOException

ABL4J (Alignment Based Learning for Java) - 0.9.7

© 2007 Stephan Schwiebert