public abstract class EntityCachingAbstractSequencePriorBIO<IN extends CoreMap> extends java.lang.Object implements ListeningSequenceModel
| Modifier and Type | Field and Description |
|---|---|
protected int |
backgroundSymbol |
protected Index<java.lang.String> |
classIndex |
protected int |
numClasses |
protected int[] |
possibleValues |
protected int[] |
sequence |
protected Index<java.lang.String> |
tagIndex |
| Constructor and Description |
|---|
EntityCachingAbstractSequencePriorBIO(java.lang.String backgroundSymbol,
Index<java.lang.String> classIndex,
Index<java.lang.String> tagIndex,
java.util.List<IN> doc) |
| Modifier and Type | Method and Description |
|---|---|
edu.stanford.nlp.ie.EntityBIO |
extractEntity(int[] sequence,
int position,
java.lang.String tag)
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.
|
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.EntityBIO entity,
int position) |
int[] |
otherOccurrences(edu.stanford.nlp.ie.EntityBIO entity)
finds other locations in the sequence where the sequence of
words in this entity occurs.
|
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.
|
static int[] |
toArray(java.util.List<java.lang.Integer> list) |
java.lang.String |
toString() |
java.lang.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 final int backgroundSymbol
protected final int numClasses
protected final int[] possibleValues
protected final Index<java.lang.String> classIndex
protected final Index<java.lang.String> tagIndex
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.EntityBIO extractEntity(int[] sequence,
int position,
java.lang.String tag)
public int[] otherOccurrences(edu.stanford.nlp.ie.EntityBIO entity)
public static int[] toArray(java.util.List<java.lang.Integer> list)
public boolean matches(edu.stanford.nlp.ie.EntityBIO entity,
int position)
public void updateSequenceElement(int[] sequence,
int position,
int oldVal)
SequenceListenerupdateSequenceElement in interface SequenceListenerpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(int pos)