public class ExtractionObject
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ExtractionObject(java.lang.String objectId,
CoreMap sentence,
Span span,
java.lang.String type,
java.lang.String subtype) |
Modifier and Type | Method and Description |
---|---|
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) |
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
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.Object
public 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
-