opennlp.tools.cmdline
Class AbstractEvaluatorTool<T,P>

java.lang.Object
  extended by opennlp.tools.cmdline.CmdLineTool
      extended by opennlp.tools.cmdline.TypedCmdLineTool<T>
          extended by opennlp.tools.cmdline.AbstractTypedParamTool<T,P>
              extended by opennlp.tools.cmdline.AbstractEvaluatorTool<T,P>
Direct Known Subclasses:
ChunkerEvaluatorTool, POSTaggerEvaluatorTool, SentenceDetectorEvaluatorTool, TokenizerMEEvaluatorTool, TokenNameFinderEvaluatorTool

public class AbstractEvaluatorTool<T,P>
extends AbstractTypedParamTool<T,P>

Base class for evaluator tools.


Field Summary
protected  ObjectStreamFactory<T> factory
           
protected  P params
           
protected  ObjectStream<T> sampleStream
           
 
Fields inherited from class opennlp.tools.cmdline.AbstractTypedParamTool
paramsClass
 
Fields inherited from class opennlp.tools.cmdline.TypedCmdLineTool
type
 
Constructor Summary
protected AbstractEvaluatorTool(Class<T> sampleType, Class<P> params)
          Constructor with type parameters.
 
Method Summary
 void run(String format, String[] args)
          Executes the tool with the given parameters.
 
Methods inherited from class opennlp.tools.cmdline.AbstractTypedParamTool
getHelp
 
Methods inherited from class opennlp.tools.cmdline.TypedCmdLineTool
getBasicHelp, getHelp, getStreamFactory, validateAllArgs, validateFactoryArgs
 
Methods inherited from class opennlp.tools.cmdline.CmdLineTool
getBasicHelp, getName, getShortDescription, hasParams, validateAndParseParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

params

protected P params

factory

protected ObjectStreamFactory<T> factory

sampleStream

protected ObjectStream<T> sampleStream
Constructor Detail

AbstractEvaluatorTool

protected AbstractEvaluatorTool(Class<T> sampleType,
                                Class<P> params)
Constructor with type parameters.

Parameters:
sampleType - class of the template parameter
params - interface with parameters
Method Detail

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.