Annotating dialogues with Prodigy

Hi! If your messages are all separate and your goal is to display multiple of them together, I do think those are the best options – at least, I couldn't think of an alternative way to present the content with the existing or custom interfaces.

If you want to avoid recalculating the offsets, it might be simpler to use plain text / HTML blocks for the text shown before and after. You can format those however you like and you could use an html_template to reference specific fields in the data. So your input could be {"before": "...", "after": "...", "text": "..."}.

The disabled tokens shouldn't affect the rendered entity spans. Maybe it's an off-by-one error? The token_end index of the span should be inclusive, and maybe also double-check that the spans are provided in the order they occur in the text.

Prodigy v1.10.6 supports rendering newlines in the relations UI: newlines in relations annotation - #17 by ines

Also, on the topic of annotating and linking sentences: a similar use case came up in another thread a while ago and I suggested an experimental approach of using symbols/numbers to represent sentences or sentence fragments. So instead of connecting very long blocks with very little visual gain, you'd be looking at the full dialog and then annotating relationships in an abstract representation of it. Using relations interface for large texts - #4 by ines

It's possible that this is less relevant for your use case if your texts are fairly short. But it could still be worth experimenting with.