Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_RELEVANCE |
int |
id |
protected Set<Integer> |
indicies
Start indices.
|
protected float |
relevance |
protected String |
text |
protected String |
tool |
protected String |
type |
protected String |
uri |
Constructor and Description |
---|
Entity(Entity entity)
Copy constructor.
|
Entity(String text,
String type)
Constructor.
|
Entity(String text,
String type,
float relevance)
Constructor.
|
Entity(String text,
String type,
float relevance,
String tool)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Entity |
addAllIndicies(Set<Integer> indices)
Adds start indices.
|
Entity |
addIndicies(int index)
Adds start indices
|
void |
addText(String text) |
static List<Entity> |
breakdownAndSortEntity(Set<Entity> entities)
Each entity with just one index and sorted.
|
boolean |
equals(Object obj) |
static int |
getIndex(Entity e)
The entity needs a single index pair.
|
Set<Integer> |
getIndices()
Gets all start indices.
|
float |
getRelevance() |
String |
getText() |
String |
getToolName() |
String |
getType() |
String |
getUri() |
int |
hashCode() |
static Map<Integer,Entity> |
indexToEntity(List<Entity> entities) |
void |
setText(String text) |
void |
setUri(String uri) |
String |
toString() |
public static final float DEFAULT_RELEVANCE
public int id
protected String text
protected String type
protected String uri
protected float relevance
protected String tool
public Entity(Entity entity)
entity
- public Entity(String text, String type, float relevance)
text
- type
- relevance
- public void addText(String text)
public Entity addIndicies(int index)
index
- public Entity addAllIndicies(Set<Integer> indices)
indices
- public String getToolName()
getToolName
in interface IData
public String getText()
public String getType()
public float getRelevance()
public String getUri()
public void setUri(String uri)
public void setText(String text)
public static int getIndex(Entity e)
e
- public static List<Entity> breakdownAndSortEntity(Set<Entity> entities)
entities
- Copyright © 2024. All rights reserved.