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
Key | Type | Description |
---|---|---|
start_id | Number | Subsentence start index by token |
end_id | Number | Subsentence end index by token |
start_indexes | Number | Subsentence start index by character |
end_indexes | Number | Subsentence end index by character |
Subsentence Example
{ "start_id": 0, "end_id": 2, "start_indexes": 0, "end_indexes": 18 }