|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopennlp.model.AbstractModel
public abstract class AbstractModel
Nested Class Summary | |
---|---|
static class |
AbstractModel.ModelType
|
Constructor Summary | |
---|---|
AbstractModel(Context[] params,
java.lang.String[] predLabels,
IndexHashTable<java.lang.String> pmap,
java.lang.String[] outcomeNames)
|
|
AbstractModel(Context[] params,
java.lang.String[] predLabels,
java.lang.String[] outcomeNames)
|
|
AbstractModel(Context[] params,
java.lang.String[] predLabels,
java.lang.String[] outcomeNames,
int correctionConstant,
double correctionParam)
|
Method Summary | |
---|---|
java.lang.String |
getAllOutcomes(double[] ocs)
Return a string matching all the outcome names with all the probabilities produced by the eval(String[] context)
method. |
java.lang.String |
getBestOutcome(double[] ocs)
Return the name of the outcome corresponding to the highest likelihood in the parameter ocs. |
java.lang.Object[] |
getDataStructures()
Provides the fundamental data structures which encode the maxent model information. |
int |
getIndex(java.lang.String outcome)
Gets the index associated with the String name of the given outcome. |
AbstractModel.ModelType |
getModelType()
|
int |
getNumOutcomes()
Returns the number of outcomes for this model. |
java.lang.String |
getOutcome(int i)
Return the name of an outcome corresponding to an int id. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface opennlp.model.MaxentModel |
---|
eval, eval, eval |
Constructor Detail |
---|
public AbstractModel(Context[] params, java.lang.String[] predLabels, IndexHashTable<java.lang.String> pmap, java.lang.String[] outcomeNames)
public AbstractModel(Context[] params, java.lang.String[] predLabels, java.lang.String[] outcomeNames)
public AbstractModel(Context[] params, java.lang.String[] predLabels, java.lang.String[] outcomeNames, int correctionConstant, double correctionParam)
Method Detail |
---|
public final java.lang.String getBestOutcome(double[] ocs)
getBestOutcome
in interface MaxentModel
ocs
- A double[] as returned by the eval(String[] context)
method.
public AbstractModel.ModelType getModelType()
public final java.lang.String getAllOutcomes(double[] ocs)
eval(String[] context)
method.
getAllOutcomes
in interface MaxentModel
ocs
- A double[]
as returned by the
eval(String[] context)
method.
double[] ocs
)
for each one.public final java.lang.String getOutcome(int i)
getOutcome
in interface MaxentModel
i
- An outcome id.
public int getIndex(java.lang.String outcome)
getIndex
in interface MaxentModel
outcome
- the String name of the outcome for which the
index is desired
public int getNumOutcomes()
MaxentModel
getNumOutcomes
in interface MaxentModel
public final java.lang.Object[] getDataStructures()
getDataStructures
in interface MaxentModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |