Package edu.upenn.seas.mstparser.io
Class DependencyWriter
- java.lang.Object
-
- edu.upenn.seas.mstparser.io.DependencyWriter
-
- Direct Known Subclasses:
CONLLWriter,MSTWriter
public abstract class DependencyWriter extends Object
A class that defines common behavior and abstract methods for writers for different formats.Created: Sat Nov 10 15:25:10 2001
- Version:
- $Id: DependencyWriter.java 94 2007-01-17 17:05:12Z jasonbaldridge $
- Author:
- Jason Baldridge
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanlabeledprotected BufferedWriterwriter
-
Constructor Summary
Constructors Constructor Description DependencyWriter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DependencyWritercreateDependencyWriter(String format, boolean labeled)voidfinishWriting()booleanisLabeled()voidstartWriting(String file)abstract Stringwrite(DependencyInstance instance, boolean fileAccess)
-
-
-
Field Detail
-
writer
protected BufferedWriter writer
-
labeled
protected boolean labeled
-
-
Method Detail
-
createDependencyWriter
public static DependencyWriter createDependencyWriter(String format, boolean labeled) throws IOException
- Throws:
IOException
-
startWriting
public void startWriting(String file) throws IOException
- Throws:
IOException
-
finishWriting
public void finishWriting() throws IOException- Throws:
IOException
-
isLabeled
public boolean isLabeled()
-
write
public abstract String write(DependencyInstance instance, boolean fileAccess) throws IOException
- Throws:
IOException
-
-