Class CensusDictionaryCreatorTool
java.lang.Object
opennlp.tools.cmdline.CmdLineTool
opennlp.tools.cmdline.BasicCmdLineTool
opennlp.tools.cmdline.namefind.CensusDictionaryCreatorTool
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interfaceCreate a list of expected parameters. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DictionarycreateDictionary(ObjectStream<StringList> sampleStream) Creates a dictionary.getHelp()voidExecutes the tool with the given parameters.Methods inherited from class CmdLineTool
getBasicHelp, getBasicHelp, getName, hasParams, validateAndParseParams
-
Field Details
-
logger
private static final org.slf4j.Logger logger
-
-
Constructor Details
-
CensusDictionaryCreatorTool
public CensusDictionaryCreatorTool()
-
-
Method Details
-
getShortDescription
- Overrides:
getShortDescriptionin classCmdLineTool- Returns:
- Retrieves a short description of what the tool does
-
getHelp
- Specified by:
getHelpin classCmdLineTool- Returns:
- Retrieves a description on how to use the tool
-
createDictionary
Creates a dictionary.- Parameters:
sampleStream- stream of samples.- Returns:
- a
Dictionaryclass containing the name dictionary built from the input file. - Throws:
IOException- IOException
-
run
Description copied from class:BasicCmdLineToolExecutes the tool with the given parameters.- Specified by:
runin classBasicCmdLineTool- Parameters:
args- arguments
-