|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.illinois.cs.cogcomp.lbj.coref.ir.Entity
public class Entity
An entity is a collection of mentions that are coreferential, combined with some metadata about them.
Field Summary | |
---|---|
private java.lang.String |
m_id
|
private java.util.List<Mention> |
m_mentions
|
private java.util.List<Chunk> |
m_names
|
private java.util.List<Mention> |
m_sortedMentions
|
private java.lang.String |
m_specificity
|
private java.lang.String |
m_subtype
|
private java.lang.String |
m_type
|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
Entity()
Basic constructor. |
|
Entity(java.lang.String id,
java.lang.String type,
java.lang.String subtype,
java.lang.String specificity)
Creates an empty entity (containing no mentions) |
|
Entity(java.lang.String id,
java.lang.String type,
java.lang.String subtype,
java.lang.String specificity,
java.util.List<Mention> mentions,
java.util.List<Chunk> names)
Creates an entity with the specified mentions. |
Method Summary | |
---|---|
void |
addMention(Mention m)
Adds a mention to the entity. |
void |
addNames(java.util.List<Chunk> entNames)
Add all the chunks as names to the existing set of names. |
int |
compareTo(Entity e)
Compare by short eID numerically, or lexicographically if same numbers. |
java.lang.String |
getID()
Gets the ID of the entity. |
Mention |
getMention(int i)
Gets the specified mention. |
java.util.List<Mention> |
getMentions()
Gets a reference to the list of mentions. |
java.lang.String |
getShortID()
Gets the short ID, which is the entity ID disregarding the DocID and the "-E". |
java.util.List<Mention> |
getSortedMentions()
Gets a reference to the list of mentions sorted in their natural order defined by their compare function. |
java.lang.String |
getSpecificity()
Gets the specificity (SPC or GEN). |
java.lang.String |
getSubtype()
Gets the entity subtype. |
java.lang.String |
getType()
Gets the entity type (PER, ORG, GPE, LOC, WEA, VEH, or FAC) |
private void |
initListsDefault()
|
java.lang.String |
toString()
Generate a string representation of this. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.lang.String m_id
private java.lang.String m_type
private java.lang.String m_subtype
private java.lang.String m_specificity
private java.util.List<Mention> m_mentions
private java.util.List<Mention> m_sortedMentions
private java.util.List<Chunk> m_names
Constructor Detail |
---|
public Entity()
public Entity(java.lang.String id, java.lang.String type, java.lang.String subtype, java.lang.String specificity)
id
- The entity ID.type
- The entity TYPE (PER, ORG, GPE, LOC, WEA, VEH, or FAC)subtype
- The entity SUBTYPE.specificity
- The specificity, specific (SPC) or generic (GEN)
This is the attribute CLASS
in an .apf.xml
file.public Entity(java.lang.String id, java.lang.String type, java.lang.String subtype, java.lang.String specificity, java.util.List<Mention> mentions, java.util.List<Chunk> names)
id
- The entity ID.type
- The entity TYPE (PER, ORG, GPE, LOC, WEA, VEH, or FAC)subtype
- The entity SUBTYPE.specificity
- The specificity, specific (SPC) or generic (GEN)
This is the attribute CLASS
in an .apf.xml
file.mentions
- a list of Mention
s.names
- a List of Chunk
s representing names.Method Detail |
---|
private void initListsDefault()
public void addMention(Mention m)
m
- A mention.public java.util.List<Mention> getMentions()
public java.util.List<Mention> getSortedMentions()
public Mention getMention(int i)
i
- The position in the list of mentions.
public java.lang.String getID()
public java.lang.String getType()
public java.lang.String getSubtype()
public java.lang.String getSpecificity()
public void addNames(java.util.List<Chunk> entNames)
entNames
- The names to add.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getShortID()
public int compareTo(Entity e)
compareTo
in interface java.lang.Comparable<Entity>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |