ipipan.spejd.readers
Class Reader
java.lang.Object
ipipan.spejd.readers.Reader
- Direct Known Subclasses:
- MorphReader, PlainTextReader
public abstract class Reader
- extends java.lang.Object
Method Summary |
static Reader |
getReader(java.io.File path)
Get the appropriate reader for this path. |
abstract Entity |
loadToken()
Get the next token from the input. |
abstract boolean |
nextSentence(java.io.PrintStream out)
Move on to the next sentence. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
AUTO
public static final int AUTO
- See Also:
- Constant Field Values
PLAIN_TXT
public static final int PLAIN_TXT
- See Also:
- Constant Field Values
XCES_ANA
public static final int XCES_ANA
- See Also:
- Constant Field Values
Reader
public Reader()
loadToken
public abstract Entity loadToken()
- Get the next token from the input.
- Returns:
- segment or no space, null if end of sentence or file
nextSentence
public abstract boolean nextSentence(java.io.PrintStream out)
- Move on to the next sentence.
- Parameters:
out
- result file
- Returns:
- true if there exists a next sentence
getReader
public static Reader getReader(java.io.File path)
- Get the appropriate reader for this path.