Package opennlp.tools.ml
Class AbstractTrainer
- java.lang.Object
-
- opennlp.tools.ml.AbstractTrainer
-
- Direct Known Subclasses:
AbstractEventModelSequenceTrainer
,AbstractEventTrainer
,AbstractSequenceTrainer
public abstract class AbstractTrainer extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALGORITHM_PARAM
static int
CUTOFF_DEFAULT
static java.lang.String
CUTOFF_PARAM
static int
ITERATIONS_DEFAULT
static java.lang.String
ITERATIONS_PARAM
static java.lang.String
TRAINER_TYPE_PARAM
static boolean
VERBOSE_DEFAULT
static java.lang.String
VERBOSE_PARAM
-
Constructor Summary
Constructors Constructor Description AbstractTrainer()
AbstractTrainer(TrainingParameters parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getAlgorithm()
int
getCutoff()
int
getIterations()
void
init(java.util.Map<java.lang.String,java.lang.String> trainParams, java.util.Map<java.lang.String,java.lang.String> reportMap)
Deprecated.void
init(TrainingParameters trainingParameters, java.util.Map<java.lang.String,java.lang.String> reportMap)
boolean
isValid()
Deprecated.Usevalidate()
instead.void
validate()
Check parameters.
-
-
-
Field Detail
-
ALGORITHM_PARAM
public static final java.lang.String ALGORITHM_PARAM
- See Also:
- Constant Field Values
-
TRAINER_TYPE_PARAM
public static final java.lang.String TRAINER_TYPE_PARAM
- See Also:
- Constant Field Values
-
CUTOFF_PARAM
public static final java.lang.String CUTOFF_PARAM
- See Also:
- Constant Field Values
-
CUTOFF_DEFAULT
public static final int CUTOFF_DEFAULT
- See Also:
- Constant Field Values
-
ITERATIONS_PARAM
public static final java.lang.String ITERATIONS_PARAM
- See Also:
- Constant Field Values
-
ITERATIONS_DEFAULT
public static final int ITERATIONS_DEFAULT
- See Also:
- Constant Field Values
-
VERBOSE_PARAM
public static final java.lang.String VERBOSE_PARAM
- See Also:
- Constant Field Values
-
VERBOSE_DEFAULT
public static final boolean VERBOSE_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractTrainer
public AbstractTrainer()
-
AbstractTrainer
public AbstractTrainer(TrainingParameters parameters)
-
-
Method Detail
-
init
public void init(TrainingParameters trainingParameters, java.util.Map<java.lang.String,java.lang.String> reportMap)
-
init
@Deprecated public void init(java.util.Map<java.lang.String,java.lang.String> trainParams, java.util.Map<java.lang.String,java.lang.String> reportMap)
Deprecated.
-
getAlgorithm
public java.lang.String getAlgorithm()
-
getCutoff
public int getCutoff()
-
getIterations
public int getIterations()
-
validate
public void validate()
Check parameters. If subclass overrides this, it should call super.validate();- Throws:
java.lang.IllegalArgumentException
-
isValid
@Deprecated public boolean isValid()
Deprecated.Usevalidate()
instead.- Returns:
-
-