Skip to content

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

KeyTypeDescription
spansSpan [ ]Sentences inside the document
clustersCluster [ ]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

KeyTypeDescription
sentence_indexNumberIndex of the sentence
token_indexesnumber []Indexes of the tokens
cluster_indexNumberIndex of the cluster

Span Example

{
	"sentence_index": 0,
	"token_indexes": [4],
	"cluster_index": 0
}

Cluster

Cluster Format

number []

Cluster Example

[0, 1]

Next steps