Package opennlp.tools.ml.perceptron
Class PerceptronModel
java.lang.Object
opennlp.tools.ml.model.AbstractModel
opennlp.tools.ml.perceptron.PerceptronModel
- All Implemented Interfaces:
MaxentModel
-
Nested Class Summary
Nested classes/interfaces inherited from class opennlp.tools.ml.model.AbstractModel
AbstractModel.ModelType -
Constructor Summary
ConstructorsConstructorDescriptionPerceptronModel(Context[] params, String[] predLabels, String[] outcomeNames) -
Method Summary
Modifier and TypeMethodDescriptionstatic double[]eval(int[] context, double[] prior, EvalParameters model) double[]Evaluates a context.double[]Evaluates a context.double[]Evaluates a contexts with the specified context values.double[]Methods inherited from class opennlp.tools.ml.model.AbstractModel
equals, getAllOutcomes, getBestOutcome, getDataStructures, getIndex, getModelType, getNumOutcomes, getOutcome, hashCode
-
Constructor Details
-
PerceptronModel
-
-
Method Details
-
eval
Description copied from interface:MaxentModelEvaluates a context.- Parameters:
context- A list of String names of the contextual predicates which are to be evaluated together.- Returns:
- an array of the probabilities for each of the different outcomes, all of which sum to 1.
-
eval
Description copied from interface:MaxentModelEvaluates a contexts with the specified context values.- Parameters:
context- A list of String names of the contextual predicates which are to be evaluated together.values- The values associated with each context.- Returns:
- an array of the probabilities for each of the different outcomes, all of which sum to 1.
-
eval
Description copied from interface:MaxentModelEvaluates a context.- Parameters:
context- A list of String names of the contextual predicates which are to be evaluated together.probs- An array which is populated with the probabilities for each of the different outcomes, all of which sum to 1.- Returns:
- an array of the probabilities for each of the different outcomes, all of which sum to 1.
-
eval
-
eval
-