Number of Labels

Is it possible to have a scroll bar for the label panel? I have an previously annotated set of documents, where the combined set of possible labels is 80. I am able to load them using a file, but I can't see the annotated sentence because the panel covers the whole screen. I know it is there, because if I accept or decline the suggested annotation, it does show up on the left frame

Hi! The label bar at the top has the class .prodigy-title, so you could do something like this via the global_css config setting to give the container a maximum height and make it scrollable:

.prodigy-title {
    max-height: 150px;  /* or any other height */
    overflow-y: auto;
}

That said, if your goal is to annotate named entities or similar spans and you ended up with this many labels, we'd typically recommend rethinking your label scheme and structuring your task differently. You're making your life a lot harder this way, and it'll be much more difficult to create consistently annotated data with enough coverage, and your model will be much less likely to learn from it effectively. See this thread for more background and suggestions:

I tried setting the global_css as follows in the prodigy.json file:
"global_css": ".prodigy-title { max-height: 140px; overflow-y: auto; }"
However, I see no change.

But if I add the same attributes to the element with class "prodigy-title ..." via Chrome's 'Inspect element' tool, I do get the expected result. Is global_css being ignored for some reason? I am using the a nightly version with spaCy 3

That said, if your goal is to annotate named entities or similar spans and you ended up with this many labels, we'd typically recommend rethinking your label scheme and structuring your task differently. You're making your life a lot harder this way, and it'll be much more difficult to create consistently annotated data with enough coverage, and your model will be much less likely to learn from it effectively.

I will be trying to come up with a scheme for this, as well as using a pattern file. But I think the labels that appear in the annotations do appear in the label bar as well even if they are not in the labels file, correct?

That's definitely strange! Where are you adding the global_css? It should either go in your prodigy.json or in the "config" returned by your recipe function. If you've added it to your recipe function, double-check that you don't also have a conflicting value in the prodigy.json – otherwise, that would end up overwriting the recipe defaults.

By default, they shouldn't. You can have labels in your data that are not part of the selectable options you pass in via --labels. (Whether that's a good idea kinda depends on what you're doing – it would mean that you couldn't remove and re-add an existing label if it's not in your label options.)

I'm using the ner.correct recipe with an existing spaCy model.
I have made just two changes to the default prodigy.json as given in the setup and installation pages. Neither change had an effect.
{
"theme": "basic",
"custom_theme": {
"labels": {
"ACCESSORIES": "#ff0000"
},

},
"buttons": ["accept", "reject", "ignore", "undo"],
"batch_size": 10,
"history_size": 10,
"port": 8080,
"host": "localhost",
"cors": true,
"db": "sqlite",
"db_settings": {},
"api_keys": {},
"validate": true,
"auto_exclude_current": true,
"instant_submit": false,
"feed_overlap": false,
"ui_lang": "en",
"project_info": ["dataset", "session", "lang", "recipe_name", "view_id", "label"],
"show_stats": false,
"hide_meta": false,
"show_flag": false,
"instructions": false,
"swipe": false,
"swipe_gestures": { "left": "accept", "right": "reject" },
"split_sents_threshold": false,
"html_template": false,
"global_css": ".prodigy-title-wrapper { max-height: 140px; overflow-y: auto; font-size:15px}"
"javascript": null,
"writing_dir": "ltr",
"show_whitespace": false
}

I have verified that PRODIGY_HOME points to the directory containing .prodigy (not my home directory).

OS: Windows 10

Deleting the PRODIGY_HOME environment setting and moving the .prodigy to my home directory gave me an error about the format of the prodigy.json file. I fixed both, and got the expected result. However, if I put back the environment variable and moved the .prodigy folder back to where it should be, it seemed to use the defaults and ignored the .prodigy.json! For the moment, I am letting the .prodigy folder be in my home directory, but would rather not have it there.

I looks like one can change the colors of the annotation labels. I would like to change the colors of the label buttons at some point. Is there an easy way to control that?

Ah, that's strange! It sounds like the path to the PRODIGY_HOME isn't recognised correctly. Are you providing it as an absolute path and did you double-check that it's definitely correct and exists?

Instead of using the .prodigy directory, another option is to put a prodigy.json in your current working directory. This can be more convenient, and it allows you to have project-specific configurations.

The custom theme also lets you override the colours used to represent accept, reject, ignore and undo: Web Application · Prodigy · An annotation tool for AI, Machine Learning & NLP Those are the colours that are used for the buttons.