public class EntityMention extends ExtractionObject
attributeMap, extentTokenSpan, objectId, sentence, subType, type, typeProbabilities| Constructor and Description |
|---|
EntityMention(java.lang.String objectId,
CoreMap sentence,
Span extentSpan,
Span headSpan,
java.lang.String type,
java.lang.String subtype,
java.lang.String mentionType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(EntityMention otherEnt,
boolean useSubType) |
boolean |
equals(java.lang.Object other) |
java.lang.String |
getCorefID() |
Span |
getHead() |
int |
getHeadTokenEnd() |
int |
getHeadTokenStart() |
java.lang.String |
getMentionType() |
java.lang.String |
getNormalizedName() |
CoreLabel |
getSyntacticHeadToken() |
int |
getSyntacticHeadTokenPosition() |
Tree |
getSyntacticHeadTree() |
java.lang.String |
getValue()
Get the text value of this entity.
|
int |
hashCode() |
boolean |
headIncludes(EntityMention otherEnt,
boolean useSubType) |
boolean |
labelEquals(EntityMention otherEnt,
boolean useSubType)
Compares the labels of the two mentions
|
static java.lang.String |
makeUniqueId()
Creates a new unique id for an entity mention
|
void |
setCorefID(java.lang.String id) |
void |
setHeadTokenPosition(int i) |
void |
setHeadTokenSpan(Span s) |
void |
setNormalizedName(java.lang.String n) |
static void |
sortByHeadSpan(java.util.List<EntityMention> mentions) |
boolean |
textEquals(EntityMention otherEnt)
Compares the text spans of the two entity mentions.
|
java.lang.String |
toString() |
attributeMap, concatenateTypes, getDocumentId, getExtent, getExtentString, getExtentTokenEnd, getExtentTokenStart, getFullValue, getObjectId, getSentence, getSpan, getSubType, getType, getTypeProbabilities, printableObject, setExtent, setSentence, setType, setTypeProbabilities, sortByExtentpublic java.lang.String getCorefID()
public void setCorefID(java.lang.String id)
public java.lang.String getMentionType()
public Span getHead()
public int getHeadTokenStart()
public int getHeadTokenEnd()
public void setHeadTokenSpan(Span s)
public void setHeadTokenPosition(int i)
public int getSyntacticHeadTokenPosition()
public CoreLabel getSyntacticHeadToken()
public Tree getSyntacticHeadTree()
public java.lang.String getNormalizedName()
public void setNormalizedName(java.lang.String n)
public boolean equals(java.lang.Object other)
equals in class ExtractionObjectpublic boolean headIncludes(EntityMention otherEnt, boolean useSubType)
public boolean equals(EntityMention otherEnt, boolean useSubType)
public boolean labelEquals(EntityMention otherEnt, boolean useSubType)
otherEnt - useSubType - public boolean textEquals(EntityMention otherEnt)
otherEnt - public java.lang.String getValue()
getValue in class ExtractionObjectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static void sortByHeadSpan(java.util.List<EntityMention> mentions)
public static java.lang.String makeUniqueId()