Package opennlp.tools.cmdline.namefind
Class CensusDictionaryCreatorTool
- java.lang.Object
-
- opennlp.tools.cmdline.CmdLineTool
-
- opennlp.tools.cmdline.BasicCmdLineTool
-
- opennlp.tools.cmdline.namefind.CensusDictionaryCreatorTool
-
public class CensusDictionaryCreatorTool extends opennlp.tools.cmdline.BasicCmdLineToolThis tool helps create a loadable dictionary for theNameFinder, 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 Summary
Constructors Constructor Description CensusDictionaryCreatorTool()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DictionarycreateDictionary(ObjectStream<StringList> sampleStream)Creates a dictionary.StringgetHelp()StringgetShortDescription()voidrun(String[] args)Executes the tool with the given parameters.
-
-
-
Method Detail
-
getShortDescription
public String getShortDescription()
- Overrides:
getShortDescriptionin classopennlp.tools.cmdline.CmdLineTool- Returns:
- Retrieves a short description of what the tool does
-
getHelp
public String getHelp()
- Specified by:
getHelpin classopennlp.tools.cmdline.CmdLineTool- Returns:
- Retrieves 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
Dictionaryclass 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.BasicCmdLineToolExecutes the tool with the given parameters.- Specified by:
runin classopennlp.tools.cmdline.BasicCmdLineTool- Parameters:
args- arguments
-
-