|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkylm.reader.TextFileSentenceReader
public class TextFileSentenceReader
Implementation of a loader that loads from a text file
| Constructor Summary | |
|---|---|
TextFileSentenceReader(java.lang.String fileName)
The constructor, saves the file and uses a single space as the default divider |
|
TextFileSentenceReader(java.lang.String fileName,
java.lang.String divider)
The constructor, saves the file name and uses the passed in divider |
|
| Method Summary | |
|---|---|
java.util.Iterator<java.lang.String[]> |
iterator()
|
boolean |
supportsReset()
Whether the sentence loader supports returning multiple iterators or not. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextFileSentenceReader(java.lang.String fileName)
throws java.io.IOException
fileName - The name of the file to be opened
java.io.IOException - if the file doesn't exist or is unreadable
public TextFileSentenceReader(java.lang.String fileName,
java.lang.String divider)
throws java.io.IOException
fileName - The name of the file to be openeddivider - A regular expression that is used to divide strings in the corpus
java.io.IOException - if the file doesn't exist or is unreadable| Method Detail |
|---|
public java.util.Iterator<java.lang.String[]> iterator()
iterator in interface java.lang.Iterable<java.lang.String[]>iterator in interface SentenceReaderpublic boolean supportsReset()
SentenceReader
supportsReset in interface SentenceReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||