Overlapping labels for paragraph annotation

Hi,
I am using Prodigy to annotate the Paragraphs. But i have to use overlapping labels. For example the below dummy paragraph has the following labels:
Ex:
<full_para_label>This the full pargraphs start. this some sub paragraph with "label1" and label1 ends here</label1 end> this is some extra sub para. this some sub paragraph with "label2" and label2 ends here</label2 end>full paragraph ends here </full_para_label end>

The above example with multiple inner labels and outer label (shown with html tags for starting and end point). How can we achive this with proidgy. Can you please suggest (with sample recipie if possible) for this case.

I have a very similar problem, see here. Any suggestions?

Hai, i have seen the post. Actually I dont know how to write the custom html annotation ui template for my use case to take marked labels(of annotator) and store in database. After finishing this i thought of going to design the model(like batch-train mode). If you know anything related to my CUSTOM HTML UI use case please share.

But for you case(this is just a suggestion): i think you can using NER Model alone with TEAM_POSITIVE, TEAM_NEGATIVE as entity labels with BIOS scheme(Begin, Inside, etc...) and using entire text as context. Finally everything depends on the dataset size.

Hi! The manual NER interface is really designed for named entities, which can't overlap. So if you want to label overlapping spans, you should make several passes over the data.

For your example, it also sounds like you might be able to come up with a smarter way of doing the top-level paragraph annotation? Highlighting long spans like paragraphs is pretty tedious – and if you have a way to extract what's a paragraph, it probably makes more sense to assign labels at the top level using the classification or choice interface, and then do the more fine-grained span annotations in another step.

Hi @ines, is there any feature to overlap now?

BTW I love prodigy, it's a great tool.

Welcome to the forum @jamespeaker :slight_smile:
Glad to hear you enjoy working with Prodigy :smiling_face:

Span categorization UI allows for annotating overlapping spans - see here for more details: Span Categorization · Prodigy · An annotation tool for AI, Machine Learning & NLP
As Ines mentioned before, it won't be the best choice for paragraph-long spans, though. It's been designed handle spans a bit longer than NER spans but, ideally, you want your spans to be sub-spans of a sentence and not several sentences (for which textcat would be a better choice).