public class ExtractionObject extends Object implements 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 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 String |
subType
Subtype, if available, e.g., GPE.CITY
|
protected String |
type
Type of this mention, e.g., GPE
|
protected Counter<String> |
typeProbabilities
Probabilities associated with this object
We report probability values for each possible type for this object
|
Constructor and Description |
---|
ExtractionObject(String objectId,
CoreMap sentence,
Span span,
String type,
String subtype) |
Modifier and Type | Method and Description |
---|---|
CoreMap |
attributeMap() |
static String |
concatenateTypes(String t1,
String t2)
Concatenates two types
|
boolean |
equals(Object other) |
String |
getDocumentId() |
Span |
getExtent() |
String |
getExtentString() |
int |
getExtentTokenEnd() |
int |
getExtentTokenStart() |
String |
getFullValue()
Always returns the text corresponding to the extent of this object, even when
getValue is overridden by subclass.
|
String |
getObjectId() |
CoreMap |
getSentence() |
static Span |
getSpan(ExtractionObject... objs)
Returns the smallest span that covers the extent of all these objects
|
String |
getSubType() |
String |
getType() |
Counter<String> |
getTypeProbabilities() |
String |
getValue()
Returns the text corresponding to the extent of this object
|
boolean |
printableObject(double beam,
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(String t) |
void |
setTypeProbabilities(Counter<String> probs) |
static void |
sortByExtent(List<ExtractionObject> objects) |
protected final String objectId
protected CoreMap sentence
protected String type
protected final String subType
protected Span extentTokenSpan
protected CoreMap attributeMap
public String getObjectId()
public 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 String getExtentString()
public String getType()
public String getSubType()
public static void sortByExtent(List<ExtractionObject> objects)
public static Span getSpan(ExtractionObject... objs)
objs
- public String getValue()
public final String getFullValue()
public void setType(String t)
public static String concatenateTypes(String t1, String t2)
t1
- t2
- public CoreMap attributeMap()
public boolean printableObject(double beam, String nilLabel)
beam
- nilLabel
-