Hi! The problem here is that the html_template currently only works with the html interface. Otherwise, it’d also be very difficult for Prodigy to know how to interpret your template – especially since some of the other annotation interfaces (like the manual NER one) are pretty complex.
So you can either write your own custom recipe, or simply use the mark recipe, which streams in your data and renders it using an interface of your choice. The following command should show your template as expected:
prodigy mark my_dataset my_data.jsonl --view-id html
Ah I think I understand. Does this mean it’s not possible to utilize the highlighting annotation UI with custom templates?
ETA: my objective is to modify the named entity interface to display additional information alongside the piece of text to be annotated. is this possible via html_template config?
In general, the built-in interfaces are designed to focus on the main annotation decision, which is why the space for additional content is kept to a minimum. But if the information to display is short and/or a link, you can use the annotation task's "meta" property. Meta entries will be displayed in the bottom right corner of the annotation card, and URLs will be linked automatically. For example:
{
"text": "Some text",
"meta": {
"note": "This is a note",
"url": "https://example.com"
}
}
Do you mean the manual NER interface that lets you highlight spans by clicking and dragging? In Prodigy v1.5.0, this interface got a special setting for rendering additional text that's not part of the highlightable annotation task. It's mostly intended for formatting characters (bullet points, line breaks) that only help the annotator visually – but depending on what you want to do, you could repurpose that feature.
The manual NER recipe pre-tokenizes the text to allow token-based selection that "snaps" to the word boundaries. You can now mark individual tokens as "disabled": true and they'll be displayed in grey and won't be selectable: