Class TokenNameFinderTrainerTool
java.lang.Object
opennlp.tools.cmdline.CmdLineTool
opennlp.tools.cmdline.TypedCmdLineTool<NameSample, TokenNameFinderTrainerTool.TrainerToolParams>
opennlp.tools.cmdline.AbstractTypedParamTool<NameSample, TokenNameFinderTrainerTool.TrainerToolParams>
opennlp.tools.cmdline.AbstractEvaluatorTool<NameSample, TokenNameFinderTrainerTool.TrainerToolParams>
opennlp.tools.cmdline.AbstractTrainerTool<NameSample, TokenNameFinderTrainerTool.TrainerToolParams>
opennlp.tools.cmdline.namefind.TokenNameFinderTrainerTool
public final class TokenNameFinderTrainerTool
extends AbstractTrainerTool<NameSample, TokenNameFinderTrainerTool.TrainerToolParams>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface -
Field Summary
Fields inherited from class AbstractTrainerTool
mlParamsFields inherited from class AbstractEvaluatorTool
factory, params, sampleStreamFields inherited from class AbstractTypedParamTool
paramsClassFields inherited from class TypedCmdLineTool
type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadResources(File resourcePath, File featureGenDescriptor) Load the resources, such as dictionaries, by reading the feature xml descriptor and looking into the directory passed as argument.static byte[]openFeatureGeneratorBytes(File featureGenDescriptorFile) (package private) static byte[]openFeatureGeneratorBytes(String featureGenDescriptorFile) voidExecutes the tool with the given parameters.Methods inherited from class AbstractTrainerTool
createTerminationIOExceptionMethods inherited from class AbstractTypedParamTool
getHelpMethods inherited from class TypedCmdLineTool
getBasicHelp, getHelp, getStreamFactory, validateAllArgs, validateFactoryArgsMethods inherited from class CmdLineTool
getBasicHelp, getName, hasParams, validateAndParseParams
-
Constructor Details
-
TokenNameFinderTrainerTool
public TokenNameFinderTrainerTool()
-
-
Method Details
-
getShortDescription
- Overrides:
getShortDescriptionin classCmdLineTool- Returns:
- Retrieves a short description of what the tool does
-
openFeatureGeneratorBytes
-
openFeatureGeneratorBytes
-
loadResources
public static Map<String,Object> loadResources(File resourcePath, File featureGenDescriptor) throws IOException Load the resources, such as dictionaries, by reading the feature xml descriptor and looking into the directory passed as argument.- Parameters:
resourcePath- The directory in which the resources are to be found.featureGenDescriptor- The feature xml descriptor.- Returns:
- A map consisting of the file name of the resource and its corresponding Object.
- Throws:
IOException
-
run
Description copied from class:TypedCmdLineToolExecutes the tool with the given parameters.- Overrides:
runin classAbstractEvaluatorTool<NameSample, TokenNameFinderTrainerTool.TrainerToolParams>- Parameters:
format- format to work withargs- command line arguments
-