|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.sequences.FactoredSequenceModel
public class FactoredSequenceModel
| Constructor Summary | |
|---|---|
FactoredSequenceModel(SequenceModel[] models,
double[] weights)
|
|
FactoredSequenceModel(SequenceModel model1,
SequenceModel model2)
|
|
FactoredSequenceModel(SequenceModel model1,
SequenceModel model2,
double wt1,
double wt2)
using this constructor results in a weighted addition of the two models' scores. |
|
| Method Summary | |
|---|---|
int[] |
getPossibleValues(int position)
0...leftWindow-1 etc are null, leftWindow...length+leftWindow-1 are words, length+leftWindow...length+leftWindow+rightWindow-1 are null; |
int |
leftWindow()
How many positions to the left a position is dependent on. |
int |
length()
|
int |
rightWindow()
How many positions to the right a position is dependent on. |
double |
scoreOf(int[] sequence)
Computes the score assigned by this model to the provided sequence. |
double |
scoreOf(int[] sequence,
int pos)
Computes the unnormalized log conditional distribution over values of the element at position pos in the sequence, conditioned on the values of the elements in all other positions of the provided sequence. |
double[] |
scoresOf(int[] sequence,
int pos)
Computes the distribution over values of the element at position pos in the sequence, conditioned on the values of the elements in all other positions of the provided sequence. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FactoredSequenceModel(SequenceModel model1,
SequenceModel model2,
double wt1,
double wt2)
model1 - model2 - wt1 - weight of model1wt2 - weight of model2
public FactoredSequenceModel(SequenceModel model1,
SequenceModel model2)
public FactoredSequenceModel(SequenceModel[] models,
double[] weights)
| Method Detail |
|---|
public double[] scoresOf(int[] sequence,
int pos)
scoresOf in interface SequenceModelsequence - the sequence containing the rest of the values to condition onpos - the position of the element to give a distribution for
public double scoreOf(int[] sequence,
int pos)
SequenceModel
scoreOf in interface SequenceModelsequence - the sequence containing the rest of the values to condition onpos - the position of the element to give a distribution for
public double scoreOf(int[] sequence)
scoreOf in interface SequenceModelsequence - the sequence to compute a score for
public int length()
length in interface SequenceModelpublic int leftWindow()
SequenceModel
leftWindow in interface SequenceModelpublic int rightWindow()
SequenceModel
rightWindow in interface SequenceModelpublic int[] getPossibleValues(int position)
SequenceModel
getPossibleValues in interface SequenceModelposition - the position
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||