opennlp.tools.cmdline
Class AbstractConverterTool<T>

java.lang.Object
  extended by opennlp.tools.cmdline.CmdLineTool
      extended by opennlp.tools.cmdline.TypedCmdLineTool<T>
          extended by opennlp.tools.cmdline.AbstractConverterTool<T>
Type Parameters:
T - class of data sample the tool converts, for example .POSSample
Direct Known Subclasses:
ChunkerConverterTool, CoreferenceConverterTool, DoccatConverterTool, ParserConverterTool, POSTaggerConverterTool, SentenceDetectorConverterTool, TokenizerConverterTool, TokenNameFinderConverterTool

public abstract class AbstractConverterTool<T>
extends TypedCmdLineTool<T>

Base class for format conversion tools.


Field Summary
 
Fields inherited from class opennlp.tools.cmdline.TypedCmdLineTool
type
 
Constructor Summary
protected AbstractConverterTool(Class<T> sampleType)
          Constructor with type parameter.
 
Method Summary
 String getHelp()
          Retrieves a description on how to use the tool.
 String getHelp(String format)
          Retrieves a description on how to use the tool.
 String getShortDescription()
          Retrieves a short description of what the tool does.
 void run(String format, String[] args)
          Executes the tool with the given parameters.
 
Methods inherited from class opennlp.tools.cmdline.TypedCmdLineTool
getBasicHelp, getStreamFactory, validateAllArgs, validateFactoryArgs
 
Methods inherited from class opennlp.tools.cmdline.CmdLineTool
getBasicHelp, getName, hasParams, validateAndParseParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConverterTool

protected AbstractConverterTool(Class<T> sampleType)
Constructor with type parameter.

Parameters:
sampleType - class of the template parameter
Method Detail

getShortDescription

public String getShortDescription()
Description copied from class: CmdLineTool
Retrieves a short description of what the tool does.

Overrides:
getShortDescription in class CmdLineTool
Returns:
a short description of what the tool does

getHelp

public String getHelp()
Description copied from class: CmdLineTool
Retrieves a description on how to use the tool.

Overrides:
getHelp in class TypedCmdLineTool<T>
Returns:
a description on how to use the tool

getHelp

public String getHelp(String format)
Description copied from class: TypedCmdLineTool
Retrieves a description on how to use the tool.

Specified by:
getHelp in class TypedCmdLineTool<T>
Parameters:
format - data format
Returns:
a description on how to use the tool

run

public void run(String format,
                String[] args)
Description copied from class: TypedCmdLineTool
Executes the tool with the given parameters.

Specified by:
run in class TypedCmdLineTool<T>
Parameters:
format - format to work with
args - command line arguments


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.