Package opennlp.tools.ml
Class AbstractTrainer
- java.lang.Object
-
- opennlp.tools.ml.AbstractTrainer
-
- Direct Known Subclasses:
AbstractEventModelSequenceTrainer
,AbstractEventTrainer
,AbstractSequenceTrainer
public abstract class AbstractTrainer extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
ALGORITHM_PARAM
static int
CUTOFF_DEFAULT
static String
CUTOFF_PARAM
static int
ITERATIONS_DEFAULT
static String
ITERATIONS_PARAM
static String
TRAINER_TYPE_PARAM
static boolean
VERBOSE_DEFAULT
static 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 String
getAlgorithm()
int
getCutoff()
int
getIterations()
void
init(Map<String,String> trainParams, Map<String,String> reportMap)
Deprecated.void
init(TrainingParameters trainingParameters, Map<String,String> reportMap)
boolean
isValid()
Deprecated.Usevalidate()
instead.void
validate()
Check parameters.
-
-
-
Field Detail
-
ALGORITHM_PARAM
public static final String ALGORITHM_PARAM
- See Also:
- Constant Field Values
-
TRAINER_TYPE_PARAM
public static final String TRAINER_TYPE_PARAM
- See Also:
- Constant Field Values
-
CUTOFF_PARAM
public static final 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 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 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, Map<String,String> reportMap)
-
init
@Deprecated public void init(Map<String,String> trainParams, Map<String,String> reportMap)
Deprecated.
-
getAlgorithm
public 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:
IllegalArgumentException
-
isValid
@Deprecated public boolean isValid()
Deprecated.Usevalidate()
instead.- Returns:
-
-