|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectopennlp.tools.formats.NameFinderCensus90NameStream
public class NameFinderCensus90NameStream
This class helps to read the US Census data from the files to build a StringList for each dictionary entry in the name-finder dictionary. The entries in the source file are as follows:
SMITH 1.006 1.006 1
Note: Do not use this class, internal use only!
| Constructor Summary | |
|---|---|
NameFinderCensus90NameStream(InputStream in,
Charset encoding)
This constructor takes an InputStream and a Charset
and opens an associated stream object with the specified encoding specified. |
|
NameFinderCensus90NameStream(ObjectStream<String> lineStream)
This constructor takes an ObjectStream and initializes the class to handle the stream. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the ObjectStream and releases all allocated
resources. |
StringList |
read()
Returns the next object. |
void |
reset()
Repositions the stream at the beginning and the previously seen object sequence will be repeated exactly. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NameFinderCensus90NameStream(ObjectStream<String> lineStream)
lineStream - an ObjectSteam that represents the
input file to be attached to this class.
public NameFinderCensus90NameStream(InputStream in,
Charset encoding)
InputStream and a Charset
and opens an associated stream object with the specified encoding specified.
in - an InputStream for the input file.encoding - the Charset to apply to the input stream.| Method Detail |
|---|
public StringList read()
throws IOException
ObjectStream
read in interface ObjectStream<StringList>IOException
public void reset()
throws IOException,
UnsupportedOperationException
ObjectStream
reset in interface ObjectStream<StringList>IOException
UnsupportedOperationException
public void close()
throws IOException
ObjectStreamObjectStream and releases all allocated
resources. After close was called its not allowed to call
read or reset.
close in interface ObjectStream<StringList>IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||