Relationship Extractor
https://analytics.babelstreet.com/rest/v1/relationships
https://raw.githubusercontent.com/rosette-api/curl-examples/develop/examples/relationships.curl
Relationship Extractor builds on the results of the Entity Extractor and Linker to identify how entities are related to each other.
Relationship extractor performs targeted relationship extraction by finding anything within the text that looks like one of the supported relationship types. This allows you to filter and process the results according to your needs.
Using linguistic tools and Wikidata to bootstrap its knowledge, the exact action connecting the entities and other related information are extracted. It uses machine learning methods over parse trees and entity mentions to analyze the connection, and then return the components within the relationships.
Relation | Description |
---|---|
ORG-FOUNDED | Holds between an organization and a person or another organization that founded it |
ORG-HEADQUARTERS | Holds between an organization and the location where its headquarters are located |
ORG-SUBSIDIARY-OF | Holds between two organizations where the first is a subsidiary of the second |
ORG-COLLABORATORS | Holds between two organizations the are working together toward a project or a goal |
ORG-ACQUIRED-BY | Holds between two organizations where the first organization was acquired by the second one |
ORG-PROVIDER-TO | Holds between two organization where the first organization is providing services or products to the second organization |
ORG-TOP-EMPLOYEES | Holds between an organization and a person who is one of the organization’s top employees |
PER-BIRTH-PLACE | Holds between a person and the location in which he was born |
PER-EMPLOYEE-MEMBER-OF | Holds between a person and an organization with which the person is affiliated |
PER-RESIDENCE | Holds between a person and its current or past location of residence |
PER-PARENTS | Holds between two person entities where the second is the parent of the first |
PER-SIBLINGS | Holds between two person entities which are siblings of one another |
PER-SPOUSE | Holds between two person entities which are the life partners of one another |
PER-OTHER-FAMILY | Holds between two person entities that belong to the same family but are not siblings, parents, children, or spouse of one another |
CIT-OF | Holds between a person and his country of citizenship |
EDU-AT | Holds between a person and an academic institution he is affiliated with |
Request
{ "content": "string", "contentUri": "string, "language": "string" }
Query Parameters
Name | Value | Description |
---|---|---|
output | rosette | Returns the response in ADM format. |
Note
All input parameters, including the text being analyzed and any relevant options, are defined in the request body.
Response
The response is a list of extracted relationships. A relationship consists of the following elements:
Predicate: The main action or verb acting on the first argument, or the action connecting multiple arguments.
PredicateID: (optional) Label of the identified relationship type.
Argument(s): One or more subjects in the relationship.
Argument ID(s): (optional) The entity ID returned for arguments that can be linked to Wikidata.
Confidence: A score for each relationship result, ranging from 0 to 1. You can use this measurement as a threshold to filter out undesired results.
{ "relationships": [ { "predicate": "string", "predicateId": "string", "arg1": "string", "argId": "string", "arg2": "string", "arg2Id": "string", "confidence": number } ] }
Supported languages
GET /relationships/supported-languages
Returns the list of supported languages and scripts for the endpoint, along with whether you have a license for the language.
Relationship Extractor currently only supports English language input.
Response
Field | Type | Description |
---|---|---|
| string | ISO 639 language code |
| string | Four-letter ISO-15924 script code |
| boolean | Indicates if you are licensed for this language |
{ "supportedLanguages": [ { "language": "string", "script": "string", "licensed": boolean } ] }