|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopennlp.tools.util.Sequence
public class Sequence
Represents a weighted sequence of outcomes.
| Constructor Summary | |
|---|---|
Sequence()
Creates a new sequence of outcomes. |
|
Sequence(java.util.List outcomes)
|
|
Sequence(Sequence s)
|
|
Sequence(Sequence s,
java.lang.String outcome,
double p)
|
|
| Method Summary | |
|---|---|
void |
add(java.lang.String outcome,
double p)
Adds an outcome and probability to this sequence. |
int |
compareTo(java.lang.Object o)
|
java.util.List |
getOutcomes()
Returns a list of outcomes for this sequence. |
double[] |
getProbs()
Returns an array of probabilities associated with the outcomes of this sequence. |
void |
getProbs(double[] ps)
Populates an array with the probabilities associated with the outcomes of this sequece. |
double |
getScore()
Returns the score of this sequence. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Sequence()
public Sequence(Sequence s)
public Sequence(Sequence s,
java.lang.String outcome,
double p)
public Sequence(java.util.List outcomes)
| Method Detail |
|---|
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable
public void add(java.lang.String outcome,
double p)
outcome - the outcome to be added.p - the probability associated with this outcome.public java.util.List getOutcomes()
public double[] getProbs()
public double getScore()
public void getProbs(double[] ps)
ps - a pre-allocated array to use to hold the values of the probabilities of the outcomes for this sequence.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||