Named entity recognition output
The API resource performing named entity recognition returns a JSON object with this format:
{
"success": Boolean success flag,
"data": {
"content": analyzed text,
"language": language code,
"version": technology version info,
"knowledge": [],
"entities": []
}
}
For the description of the contents
, language
and version
properties, see the API resources output overview.
entities
Each entities
array item represents a recognized entity, for example:
{
"type": "GEO",
"lemma": "Swansea",
"syncon": 38324,
"positions": [
{
"start": 373,
"end": 380
}
]
}
type
identifies the kind of entity. The possible values for type
are listed in the reference section.
The syncon
and the lemma
properties are the outcome of semantic analysis and lemmatization respectively. These are exactly the same processes carried out during deep linguistic analysis.
positions
is an array containing the positions of the entity's mentions in the text.
knowledge
The knowledge
array contains Knowledge Graph information about the syncons associated with the entities.
The link between an entity and the corresponding entry in this array is represented by the value of the syncon
property both objects have in common, for example:
entities
entry:
{
"lemma": "National Basketball Association",
"positions": [
{
"end": 139,
"start": 136
}
],
"syncon": 206693,
"type": "ORG"
}
Corresponding entry in the knowledge
array:
{
"label": "group.human_group.organization.sport_association",
"properties": [
{
"type": "DBpediaId",
"value": "dbpedia.org/page/National_Basketball_Association"
},
{
"type": "WikiDataId",
"value": "Q155223"
}
],
"syncon": 206693
}
Entities with the syncon property set to -1 have no corresponding entry in the knowledge
array.
Each entry in the array has a format like this:
{
"label": "person",
"properties": [
{
"type": "WikiDataId",
"value": "Q215627"
}
],
"syncon": 73282
}
The label
property is a textual rendering of the general conceptual category for the syncon in the Knowledge Graph.
The properties
array contains the outcome of Knowledge linking. Each item has two properties, type
and value
.
type
specifies the knowledge base, value
is the property value.
Possible knowledge bases and interpretation of the value
property follow.
type |
value |
---|---|
Coordinate |
Latitude and longitude |
WikiDataId |
Wikipedia article ID |
DBpediaId |
URL of the DBPedia content |
GeoNamesId |
ID of the record in the GeoNames database |