Package opennlp.tools.ml.model
Class UniformPrior
java.lang.Object
opennlp.tools.ml.model.UniformPrior
- All Implemented Interfaces:
Prior
Provide a maximum entropy model with a uniform
Prior
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
void
logPrior
(double[] dist, int[] context) Populates the specified array with the log of the distribution for the specified context.void
logPrior
(double[] dist, int[] context, float[] values) Populates the specified array with the log of the distribution for the specified context.void
Populates the specified array with the log of the distribution for the specified context.void
Method to specify the label for the outcomes and contexts.
-
Constructor Details
-
UniformPrior
public UniformPrior()
-
-
Method Details
-
logPrior
public void logPrior(double[] dist, int[] context, float[] values) Description copied from interface:Prior
Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method. -
logPrior
Description copied from interface:Prior
Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method. -
logPrior
public void logPrior(double[] dist, int[] context) Description copied from interface:Prior
Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method. -
setLabels
Description copied from interface:Prior
Method to specify the label for the outcomes and contexts. This is used to map integer outcomes and contexts to their string values. This method is called prior to any call toPrior.logPrior(double[], int[])
. -
hashCode
public int hashCode() -
equals
-