Class AbstractConverterTool<T,P>

Type Parameters:
T - The class of data sample the tool converts, for example POSSample
Direct Known Subclasses:
ChunkerConverterTool, DoccatConverterTool, LanguageDetectorConverterTool, ParserConverterTool, POSTaggerConverterTool, SentenceDetectorConverterTool, TokenizerConverterTool, TokenNameFinderConverterTool

public abstract class AbstractConverterTool<T,P> extends TypedCmdLineTool<T,P>
Base class for format conversion tools.
  • Field Details

    • logger

      private static final org.slf4j.Logger logger
  • Constructor Details

    • AbstractConverterTool

      protected AbstractConverterTool(Class<T> sampleType)
      Constructor with type parameter.
      Parameters:
      sampleType - class of the template parameter
  • Method Details

    • getShortDescription

      public String getShortDescription()
      Overrides:
      getShortDescription in class CmdLineTool
      Returns:
      Retrieves a short description of what the tool does
    • createHelpString

      private String createHelpString(String format, String usage)
    • getHelp

      public String getHelp()
      Overrides:
      getHelp in class TypedCmdLineTool<T,P>
      Returns:
      Retrieves a description on how to use the tool
    • getHelp

      public String getHelp(String format)
      Specified by:
      getHelp in class TypedCmdLineTool<T,P>
      Parameters:
      format - data format
      Returns:
      Retrieves 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,P>
      Parameters:
      format - format to work with
      args - command line arguments