Class CensusDictionaryCreatorTool


  • public class CensusDictionaryCreatorTool
    extends opennlp.tools.cmdline.BasicCmdLineTool
    This tool helps create a loadable dictionary for the NameFinder, from data collected from US Census data.

    Data for the US Census and names can be found here for the 1990 Census:
    www.census.gov

    • Constructor Detail

      • CensusDictionaryCreatorTool

        public CensusDictionaryCreatorTool()
    • Method Detail

      • getShortDescription

        public String getShortDescription()
        Description copied from class: opennlp.tools.cmdline.CmdLineTool
        Retrieves a short description of what the tool does.
        Overrides:
        getShortDescription in class opennlp.tools.cmdline.CmdLineTool
        Returns:
        a short description of what the tool does
      • getHelp

        public String getHelp()
        Description copied from class: opennlp.tools.cmdline.CmdLineTool
        Retrieves a description on how to use the tool.
        Specified by:
        getHelp in class opennlp.tools.cmdline.CmdLineTool
        Returns:
        a description on how to use the tool
      • createDictionary

        public static Dictionary createDictionary​(ObjectStream<StringList> sampleStream)
                                           throws IOException
        Creates a dictionary.
        Parameters:
        sampleStream - stream of samples.
        Returns:
        a Dictionary class containing the name dictionary built from the input file.
        Throws:
        IOException - IOException
      • run

        public void run​(String[] args)
        Description copied from class: opennlp.tools.cmdline.BasicCmdLineTool
        Executes the tool with the given parameters.
        Specified by:
        run in class opennlp.tools.cmdline.BasicCmdLineTool
        Parameters:
        args - arguments