kylm.reader
Class TextFileClassMapReader
java.lang.Object
kylm.reader.TextStreamClassMapReader
kylm.reader.TextFileClassMapReader
- All Implemented Interfaces:
- ClassMapReader
public class TextFileClassMapReader
- extends TextStreamClassMapReader
Constructor Summary |
TextFileClassMapReader(java.lang.String fileName)
The constructor, saves the file and uses a single space as the default divider |
TextFileClassMapReader(java.lang.String fileName,
java.lang.String divider)
The constructor, saves the file name and uses the passed in divider |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextFileClassMapReader
public TextFileClassMapReader(java.lang.String fileName)
throws java.io.IOException
- The constructor, saves the file and uses a single space as the default divider
- Parameters:
fileName
- The name of the file to be opened
- Throws:
java.io.IOException
- if the file doesn't exist or is unreadable
TextFileClassMapReader
public TextFileClassMapReader(java.lang.String fileName,
java.lang.String divider)
throws java.io.IOException
- The constructor, saves the file name and uses the passed in divider
- Parameters:
fileName
- The name of the file to be openeddivider
- A regular expression that is used to divide strings in the corpus
- Throws:
java.io.IOException
- if the file doesn't exist or is unreadable
readClassMap
public ClassMap readClassMap(SymbolSet ss,
int fixed,
boolean hasNames)
throws java.io.IOException
- Specified by:
readClassMap
in interface ClassMapReader
- Overrides:
readClassMap
in class TextStreamClassMapReader
- Throws:
java.io.IOException