|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.ie.machinereading.structure.ExtractionObject
public class ExtractionObject
Represents any object that can be extracted - entity, relation, event
| Field Summary | |
|---|---|
protected CoreMap |
attributeMap
This stores any optional attributes of ExtractionObjects |
protected Span |
extentTokenSpan
Maximal token span relevant for this object, e.g., the largest NP for an entity mention The offsets are relative to the sentence that contains this object |
protected java.lang.String |
objectId
Unique identifier of the object in its document |
protected CoreMap |
sentence
Sentence that contains this object This assumes that each extraction object is intra-sentential (true in ACE, Roth, BioNLP, MR) |
protected java.lang.String |
subType
Subtype, if available, e.g., GPE.CITY |
protected java.lang.String |
type
Type of this mention, e.g., GPE |
protected Counter<java.lang.String> |
typeProbabilities
Probabilities associated with this object We report probability values for each possible type for this object |
| Constructor Summary | |
|---|---|
ExtractionObject(java.lang.String objectId,
CoreMap sentence,
Span span,
java.lang.String type,
java.lang.String subtype)
|
|
| Method Summary | |
|---|---|
CoreMap |
attributeMap()
|
static java.lang.String |
concatenateTypes(java.lang.String t1,
java.lang.String t2)
Concatenates two types |
boolean |
equals(java.lang.Object other)
|
java.lang.String |
getDocumentId()
|
Span |
getExtent()
|
java.lang.String |
getExtentString()
|
int |
getExtentTokenEnd()
|
int |
getExtentTokenStart()
|
java.lang.String |
getFullValue()
Always returns the text corresponding to the extent of this object, even when getValue is overridden by subclass. |
java.lang.String |
getObjectId()
|
CoreMap |
getSentence()
|
static Span |
getSpan(ExtractionObject... objs)
Returns the smallest span that covers the extent of all these objects |
java.lang.String |
getSubType()
|
java.lang.String |
getType()
|
Counter<java.lang.String> |
getTypeProbabilities()
|
java.lang.String |
getValue()
Returns the text corresponding to the extent of this object |
boolean |
printableObject(double beam,
java.lang.String nilLabel)
Returns true if it's worth saving/printing this object This happens in two cases: 1. |
void |
setExtent(Span s)
|
void |
setSentence(CoreMap sent)
|
void |
setType(java.lang.String t)
|
void |
setTypeProbabilities(Counter<java.lang.String> probs)
|
static void |
sortByExtent(java.util.List<ExtractionObject> objects)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String objectId
protected CoreMap sentence
protected java.lang.String type
protected final java.lang.String subType
protected Span extentTokenSpan
protected CoreMap attributeMap
protected Counter<java.lang.String> typeProbabilities
| Constructor Detail |
|---|
public ExtractionObject(java.lang.String objectId,
CoreMap sentence,
Span span,
java.lang.String type,
java.lang.String subtype)
| Method Detail |
|---|
public java.lang.String getObjectId()
public java.lang.String getDocumentId()
public CoreMap getSentence()
public void setSentence(CoreMap sent)
public int getExtentTokenStart()
public int getExtentTokenEnd()
public Span getExtent()
public void setExtent(Span s)
public java.lang.String getExtentString()
public java.lang.String getType()
public java.lang.String getSubType()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic static void sortByExtent(java.util.List<ExtractionObject> objects)
public static Span getSpan(ExtractionObject... objs)
objs - public java.lang.String getValue()
public final java.lang.String getFullValue()
public void setType(java.lang.String t)
public static java.lang.String concatenateTypes(java.lang.String t1,
java.lang.String t2)
t1 - t2 - public CoreMap attributeMap()
public void setTypeProbabilities(Counter<java.lang.String> probs)
public Counter<java.lang.String> getTypeProbabilities()
public boolean printableObject(double beam,
java.lang.String nilLabel)
beam - nilLabel -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||