Tisane provides structured location data to help pinpoint flagged text fragments.
The three key location attributes are:
sentence_index: Zero-based index of the sentence containing the snippet.offset: Zero-based position of the first character in the snippet within the sentence.length: Number of characters in the snippet.
- Find the sentence text containing the snippet:
- Navigate to the
sentence_listnode. - Select a node where
index=sentence_index. - Alternatively, retrieve the sentence directly from the sentence list array.
- Navigate to the
- Get the substring:
- Use the
offsetandlengthvalues to get the substring from the sentence.
- Use the
We use sentence-based indexing instead of absolute offsets because many users need an actual sentence with the snippet for context.