Skip to content

Subsentence

Introduction

The Lettria API can split a sentence into subsentences using dependency parsing and NLP, analysing the syntactic structure of a sentence and breaking it down into smaller units.

This is useful for summarisation, translation and information extraction, where it is important to understand the meaning and relationships between different parts of a sentence.

Format

Subsentences are received inside an Array()

Example

[
	{ "start_id": 0, "end_id": 2,  "start_indexes": 0, "end_indexes": 18 },
	{ "start_id": 3, "end_id": 5,  "start_indexes": 19, "end_indexes": 35 }
]

Subsentence

Subsentence Format

KeyTypeDescription
start_idNumberSubsentence start index by token
end_idNumberSubsentence end index by token
start_indexesNumberSubsentence start index by character
end_indexesNumberSubsentence end index by character

Subsentence Example

{ "start_id": 0, "end_id": 2,  "start_indexes": 0, "end_indexes": 18 }

Next steps