Package edu.upenn.seas.mstparser.io
Class DependencyReader
- java.lang.Object
-
- edu.upenn.seas.mstparser.io.DependencyReader
-
- Direct Known Subclasses:
CONLLReader,MSTReader
public abstract class DependencyReader extends Object
A class that defines common behavior and abstract methods for readers for different formats.Created: Sat Nov 10 15:25:10 2001
- Version:
- $Id: DependencyReader.java 112 2007-03-23 19:19:28Z jasonbaldridge $
- Author:
- Jason Baldridge
-
-
Field Summary
Fields Modifier and Type Field Description protected BufferedReaderinputReaderprotected booleanlabeled
-
Constructor Summary
Constructors Constructor Description DependencyReader()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DependencyReadercreateDependencyReader(String format)static DependencyReadercreateDependencyReader(String format, boolean discourseMode)protected abstract booleanfileContainsLabels(String filename, boolean fileAccess)abstract DependencyInstancegetNext()protected ReadergetReader(String content, boolean fileAccess)booleanisLabeled()protected Stringnormalize(String s)booleanstartReading(String content, boolean fileAccess)
-
-
-
Field Detail
-
inputReader
protected BufferedReader inputReader
-
labeled
protected boolean labeled
-
-
Method Detail
-
createDependencyReader
public static DependencyReader createDependencyReader(String format, boolean discourseMode) throws IOException
- Throws:
IOException
-
createDependencyReader
public static DependencyReader createDependencyReader(String format) throws IOException
- Throws:
IOException
-
startReading
public boolean startReading(String content, boolean fileAccess) throws IOException
- Throws:
IOException
-
getReader
protected Reader getReader(String content, boolean fileAccess) throws IOException
- Throws:
IOException
-
isLabeled
public boolean isLabeled()
-
getNext
public abstract DependencyInstance getNext() throws IOException
- Throws:
IOException
-
fileContainsLabels
protected abstract boolean fileContainsLabels(String filename, boolean fileAccess) throws IOException
- Throws:
IOException
-
-