Class NameFinderCensus90NameStream

java.lang.Object
opennlp.tools.formats.NameFinderCensus90NameStream
All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.util.StringList>

@Internal public class NameFinderCensus90NameStream extends Object implements opennlp.tools.util.ObjectStream<opennlp.tools.util.StringList>
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

  • The first field is the name (in ALL CAPS).
  • The next field is a frequency in percent.
  • The next is a cumulative frequency in percent.
  • The last is a ranking.

Note: Do not use this class, internal use only!

  • Constructor Details

    • NameFinderCensus90NameStream

      public NameFinderCensus90NameStream(opennlp.tools.util.ObjectStream<String> lineStream)
      Initializes a NameFinderCensus90NameStream via opennlp.tools.util.ObjectStream<String>.
      Parameters:
      lineStream - An opennlp.tools.util.ObjectStream<String> that represents the input file to be attached to this class.
    • NameFinderCensus90NameStream

      public NameFinderCensus90NameStream(opennlp.tools.util.InputStreamFactory in, Charset encoding) throws IOException
      Initializes a NameFinderCensus90NameStream via an InputStreamFactory and a Charset. Opens an associated stream object with the specified encoding specified.
      Parameters:
      in - The InputStreamFactory for the input file.
      encoding - the Charset to apply to the input stream.
      Throws:
      IOException - Thrown if IO errors occurred.
  • Method Details