Hi! Sorry if this was confusing – the options currently use the numbers "1", "2", "3" and so on to describe the options in order (not the IDs on the individual options). This makes it easier to have one general-purpose setting, e.g. if you want to always map them to a fixed sequence of keys like QUERTY.
So in your case, your label keymap would have to look like this: {"1": "f", "2": "s"}.
Further, can I request custom key mappings at the task level, so I can apply them in my custom recipes? It would really speed up some of my common workflows, especially those with >10 options. For example, they could live in the options field, like this:
Instead of the prodigy.json, you can also use the "config" returned by your recipe. For example:
# your recipe code etc.
return {
"dataset": dataset,
"stream": stream,
"view_id": "text",
"config": {"keymap_by_label": your_keymap}
}
You could even generate the keymap automatically in Python – e.g. use the first letter of the option ID if available. Or you could accept a command line argument that sets the shortcuts.
Yes! That's what I was wanting. I've tried it and it's working fine, thanks. I hadn't appreciated you could override global settings in with the recipe config field.
I'm trying to annotate things that I want to have labels 0, 1, 2, 3, 4, 5 (similarity scores), which I would like to be in that order and annotate by pressing those 0 for 0, 1 for 1 etc.
I thought I'd try to map like this: "keymap_by_label": {"1": "0", "2": "1", "3": "2", "4": "3", "5": "4", "6": "5"}
but it didn't have the desired effect - now I have labels 1, 0, 1, 2, 3, 4!
Any advice to get round this? (Am I right in thinking this mapping's in javascript and I could edit it if I really wanted? Is there a better interface for annotating discrete similarity scores?)