Coreference
Introduction
With the Lettria API, you can identify and resolve references to entities in a given text. For example, identifying when a pronoun refers to a specific noun, determining when two nouns are referring to the same entity, or disambiguating entities that have multiple meanings.
You can use this for:
- Language translation
- Text summarisation
- Information extraction
It can help improve the accuracy and clarity of natural language processing tasks by providing a more complete understanding of the relationships between entities in the text.
Format
Key | Type | Description |
---|---|---|
spans | Span [ ] | Sentences inside the document |
clusters | Cluster [ ] | Cluster |
Example
{ "spans": [ { "sentence_index": 0, "token_indexes": [0], "cluster_index": 0 }, { "sentence_index": 0, "token_indexes": [4], "cluster_index": 0 }, { "sentence_index": 1, "token_indexes": [0], "cluster_index": 0 } ], "clusters": [[0, 4, 3, 1, 5, 7, 2, 6]] }
Spans
Span Format
Key | Type | Description |
---|---|---|
sentence_index | Number | Index of the sentence |
token_indexes | number [] | Indexes of the tokens |
cluster_index | Number | Index of the cluster |
Span Example
{ "sentence_index": 0, "token_indexes": [4], "cluster_index": 0 }
Cluster
Cluster Format
number []
Cluster Example
[0, 1]