opennlp.tools.cmdline.namefind
Class CensusDictionaryCreatorTool

java.lang.Object
  extended by opennlp.tools.cmdline.namefind.CensusDictionaryCreatorTool
All Implemented Interfaces:
CmdLineTool

public class CensusDictionaryCreatorTool
extends Object
implements CmdLineTool

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
--------------------------------------------------------------------------

Version:
$Revision: 1.7 $, $Date: 2010/09/18 02:37:06 $
Author:
James Kosin

Constructor Summary
CensusDictionaryCreatorTool()
           
 
Method Summary
static Dictionary createDictionary(ObjectStream<StringList> sampleStream)
           
 String getHelp()
          Gets the expected usage of the tool as an example.
 String getName()
          Gets the name for the tool.
 String getShortDescription()
          Gets a short description for the tool.
 void run(String[] args)
          This method is much like the old main() method used in prior class construction, and allows another main class to run() this classes method to perform the operations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CensusDictionaryCreatorTool

public CensusDictionaryCreatorTool()
Method Detail

getName

public String getName()
Gets the name for the tool.

Specified by:
getName in interface CmdLineTool
Returns:
String a name to be used to call this class.

getShortDescription

public String getShortDescription()
Gets a short description for the tool.

Specified by:
getShortDescription in interface CmdLineTool
Returns:
String a short description describing the purpose of the tool to the user.

getHelp

public String getHelp()
Gets the expected usage of the tool as an example.

Specified by:
getHelp in interface CmdLineTool
Returns:
String a descriptive example on how to properly call the tool from the command line.

createDictionary

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

run

public void run(String[] args)
This method is much like the old main() method used in prior class construction, and allows another main class to run() this classes method to perform the operations.

Specified by:
run in interface CmdLineTool
Parameters:
args - a String[] array of arguments passed to the run method


Copyright © 2010. All Rights Reserved.