Package org.predict4all.nlp.trainer.step
Enum TrainingStep
- java.lang.Object
-
- java.lang.Enum<TrainingStep>
-
- org.predict4all.nlp.trainer.step.TrainingStep
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TrainingStep>
public enum TrainingStep extends java.lang.Enum<TrainingStep>
Represent the possible training steps.
This allow training to be stopped and started again at a specific step : going to converted tokens, and then running WORDS_DICTIONARY multiple times. This is useful when testing algorithms on big corpus, it allows testing without doing the whole training again.ORDINAL IS IMPORTANT
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NGRAM_DICTIONARY
PARSER
SEMANTIC_DICTIONARY
TOKEN_CONVERT
WORDS_DICTIONARY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getOutputDirectoryName()
TrainingStep
getPreviousStep()
AbstractTrainingDocument
getStep(java.io.File documentFile, TrainingCorpus corpus)
static TrainingStep
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TrainingStep[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PARSER
public static final TrainingStep PARSER
-
TOKEN_CONVERT
public static final TrainingStep TOKEN_CONVERT
-
WORDS_DICTIONARY
public static final TrainingStep WORDS_DICTIONARY
-
NGRAM_DICTIONARY
public static final TrainingStep NGRAM_DICTIONARY
-
SEMANTIC_DICTIONARY
public static final TrainingStep SEMANTIC_DICTIONARY
-
-
Method Detail
-
values
public static TrainingStep[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TrainingStep c : TrainingStep.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TrainingStep valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getOutputDirectoryName
public java.lang.String getOutputDirectoryName()
-
getPreviousStep
public TrainingStep getPreviousStep()
-
getStep
public AbstractTrainingDocument getStep(java.io.File documentFile, TrainingCorpus corpus)
-
-