Class Context
java.lang.Object
opennlp.tools.ml.model.Context
- Direct Known Subclasses:
MutableContext
Class which associates a real valued parameter or expected value with a particular contextual
predicate or feature. This is used to store maxent model parameters as well as model and empirical
expected values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int[]The outcomes which occur with this context.protected final double[]The real valued parameters or expected values for this context. -
Constructor Summary
ConstructorsConstructorDescriptionContext(int[] outcomePattern, double[] parameters) Creates a new parameters object with the specified parameters associated with the specified outcome pattern. -
Method Summary
-
Field Details
-
parameters
protected final double[] parametersThe real valued parameters or expected values for this context. -
outcomes
protected final int[] outcomesThe outcomes which occur with this context.
-
-
Constructor Details
-
Context
public Context(int[] outcomePattern, double[] parameters) Creates a new parameters object with the specified parameters associated with the specified outcome pattern.- Parameters:
outcomePattern- Array of outcomes for which parameters exists for this context.parameters- Parameters for the outcomes specified.
-
-
Method Details
-
getOutcomes
public int[] getOutcomes()- Returns:
- Retrieves the array of outcomes for which parameters exists for this context.
-
getParameters
public double[] getParameters()- Returns:
- Retrieves the array of parameters for the outcomes of this context.
-
hashCode
-
equals
-