public abstract class EntityCachingAbstractSequencePrior<IN extends CoreMap> extends Object implements SequenceModel, SequenceListener
| Modifier and Type | Field and Description |
|---|---|
protected int |
backgroundSymbol |
protected Index<String> |
classIndex |
protected List<IN> |
doc |
protected int |
numClasses |
protected int[] |
possibleValues |
protected int[] |
sequence |
| Constructor and Description |
|---|
EntityCachingAbstractSequencePrior(String backgroundSymbol,
Index<String> classIndex,
List<IN> doc) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addingSingletonEntity(int[] sequence,
int position) |
boolean |
appendingEntity(int[] sequence,
int position) |
edu.stanford.nlp.ie.Entity |
extractEntity(int[] sequence,
int position)
extracts the entity starting at the given position
and adds it to the entity list.
|
double[] |
getConditionalDistribution(int[] sequence,
int position) |
int |
getNumClasses()
get the number of classes in the sequence model.
|
int[] |
getPossibleValues(int position)
Return the valid sequence labels (as integer indices) for a particular
position in the sequence.
|
boolean |
joiningTwoEntities(int[] sequence,
int position) |
int |
leftWindow()
How many label positions to the left influence the label assignment
at a particular position.
|
int |
length() |
boolean |
matches(edu.stanford.nlp.ie.Entity entity,
int position) |
boolean |
noChange(int[] sequence,
int position) |
int[] |
otherOccurrences(edu.stanford.nlp.ie.Entity entity)
finds other locations in the sequence where the sequence of
words in this entity occurs.
|
boolean |
prependingEntity(int[] sequence,
int position) |
boolean |
removingBeginningOfEntity(int[] sequence,
int position) |
boolean |
removingEndOfEntity(int[] sequence,
int position) |
int |
rightWindow()
How many label positions to the right influence the label assignment
at a particular position.
|
double |
scoreOf(int[] sequence,
int pos)
Computes the score of the element at the given position in the sequence,
conditioned on the values of the elements in all other positions of the
provided sequence.
|
double[] |
scoresOf(int[] sequence,
int position)
Computes the scores of labels for the element at the given position in
the sequence, conditioned on the values of the labels at all other
positions of the provided sequence.
|
void |
setInitialSequence(int[] initialSequence)
Informs this sequence listener that the value of the whole sequence is initialized to sequence
|
boolean |
splittingTwoEntities(int[] sequence,
int position) |
static int[] |
toArray(List<Integer> list) |
String |
toString() |
String |
toString(int pos) |
void |
updateSequenceElement(int[] sequence,
int position,
int oldVal)
Informs this sequence listener that the value of the element at position pos has changed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitscoreOfprotected int[] sequence
protected int backgroundSymbol
protected int numClasses
protected int[] possibleValues
public int leftWindow()
SequenceModelleftWindow in interface SequenceModelpublic int rightWindow()
SequenceModelrightWindow in interface SequenceModelpublic int[] getPossibleValues(int position)
SequenceModelgetPossibleValues in interface SequenceModelposition - The positionpublic double scoreOf(int[] sequence,
int pos)
SequenceModelscoreOf in interface SequenceModelsequence - The sequence containing the prediction and the rest of the
labels to condition onpos - The position of the element to give a score forpublic int length()
length in interface SequenceModelpublic int getNumClasses()
public double[] getConditionalDistribution(int[] sequence,
int position)
public double[] scoresOf(int[] sequence,
int position)
SequenceModelscoresOf in interface SequenceModelsequence - The sequence containing the rest of the values to condition onposition - The position of the element to give a distribution forpublic void setInitialSequence(int[] initialSequence)
SequenceListenersetInitialSequence in interface SequenceListenerpublic edu.stanford.nlp.ie.Entity extractEntity(int[] sequence,
int position)
public int[] otherOccurrences(edu.stanford.nlp.ie.Entity entity)
public boolean matches(edu.stanford.nlp.ie.Entity entity,
int position)
public boolean joiningTwoEntities(int[] sequence,
int position)
public boolean splittingTwoEntities(int[] sequence,
int position)
public boolean appendingEntity(int[] sequence,
int position)
public boolean prependingEntity(int[] sequence,
int position)
public boolean addingSingletonEntity(int[] sequence,
int position)
public boolean removingEndOfEntity(int[] sequence,
int position)
public boolean removingBeginningOfEntity(int[] sequence,
int position)
public boolean noChange(int[] sequence,
int position)
public void updateSequenceElement(int[] sequence,
int position,
int oldVal)
SequenceListenerupdateSequenceElement in interface SequenceListenerpublic String toString(int pos)