public class Entity extends Object implements Serializable, Comparable<Entity>
| Constructor and Description |
|---|
Entity(String name)
Create a new entity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLinkingURI(String uri)
Adds a matching URI to the entity.
|
void |
addProperty(Triple triple)
Adds a new property to the entity.
|
int |
compareTo(Entity n) |
void |
findRank(int K)
Give a rank to entities using the following formula : rank = ( # of
entity appearances / # of total entities appearances ) * 40% + ( # of
entity appearances in first K positions / K ) * 60%
|
String |
getCategoryName()
Returns the name of the category that the entity belongs to.
|
Set<String> |
getLinkingURIs()
Returns the matching URIs of the entity.
|
String |
getName()
Sets/changes the name of the entity.
|
int |
getNumOfOccurrences()
Returns the number of occurrences of the entity.
|
ArrayList<Triple> |
getProperties()
Returns the properties of the entity.
|
double |
getRank()
Returns the rank of the entity.
|
Set<Integer> |
getTextPositions()
Sets/changes the positions of the entity in the text.
|
void |
increaseNumOfOccurrences()
Increments (one unite) the number of occurrences of the entity.
|
void |
printUrisByRelevance()
Prints the URIs of an entity sorted by their relevance with it.
|
void |
setCategoryName(String categoryName)
Sets/changes the name of the category that the entity belongs to.
|
void |
setLinkingURIs(Set<String> matchingURIs)
Sets/changes the matching URIs of the entity.
|
void |
setName(String name)
Sets/changes the name of the entity.
|
void |
setNumOfOccurrences(int numOfOccurrences)
Sets/changes the number of occurrences of the entity.
|
void |
setProperties(ArrayList<Triple> properties)
Sets/changes the incoming properties of the entity.
|
void |
setRank(double rank)
Sets/changes the rank of the entity.
|
void |
setTextPositions(Set<Integer> textPositions)
Sets/changes the positions of the entity in the text.
|
String |
toString() |
public Entity(String name)
name - The name of the entity.public String getCategoryName()
public void setCategoryName(String categoryName)
categoryName - The name of the category that the entity belongs to.public String getName()
public void setName(String name)
name - The name of the entity.public ArrayList<Triple> getProperties()
public void setProperties(ArrayList<Triple> properties)
properties - The incoming properties of the entity.public void addProperty(Triple triple)
triple - The new triple/propertypublic double getRank()
public void setRank(double rank)
rank - The rank of the entity.public int getNumOfOccurrences()
public void setNumOfOccurrences(int numOfOccurrences)
numOfOccurrences - The number of occurrences of the entity.public void increaseNumOfOccurrences()
public Set<String> getLinkingURIs()
public void printUrisByRelevance()
throws MalformedURLException,
IOException
MalformedURLExceptionIOExceptionpublic void setLinkingURIs(Set<String> matchingURIs)
matchingURIs - The matching URIs of the entity.public void addLinkingURI(String uri)
uri - The matching URI.public Set<Integer> getTextPositions()
public void setTextPositions(Set<Integer> textPositions)
textPositions - The positions of the entity in the text.public void findRank(int K)
K - The number of first appearances.public int compareTo(Entity n)
compareTo in interface Comparable<Entity>Copyright © 2014. All rights reserved.