We are trying to create view form nlp labelling task. One of texts has thousands of choices and if we provide that as Choice in Choices or Label in Labels it kills UI performance
Can someone advise on this case? Thanks
Answer:
For this scenario we are currently working on a feature called “Async Taxonomy”, wherein the taxonomy can be loaded from a .json file. When this feature is used the taxonomy choices are not part of the labeling config, and performance will be much better.
It’s not generally available yet, but if you’re running open source label studio, you can try it out by enabling the relevant feature flag on a recent version of the app: fflag_feat_front_lsdv_5451_async_taxonomy_110823_short
Then you’d need to provide a URL hosting a flat file containing your taxonomy. The file’s structure should be like the following:
{
"items": [
{
"alias": "AN",
"value": "Antarctica",
"children": [
{
"alias": "AQ",
"value": "Antarctica",
"children": [
{
"value": "McMurdo Station"
}
]
},
{
"alias": "GS",
"value": "South Georgia and the South Sandwich Islands",
"children": [
{
"value": "Grytviken"
}
]
},
{
"alias": "TF",
"value": "French Southern Territories",
"children": [
{
"value": "Port-aux-Français"
}
]
}
]
}
]
}
Your labeling config should contain something like this:
<View>
<Text name="text" value="$text" />
<Taxonomy name="taxonomy" toName="text" apiUrl="<YOUR TAXONOMY URL>" >
</Taxonomy>
</View>
Follow up Question:
is it possible to configure single choice for taxonomy?
Answer: We have the somewhat related leafsOnly="true"
as a config option where only leaf nodes in the taxonomy can be selected, but afaik we don’t have a way of restricting the user to selecting only one choice yet (though I would need some time to fully confirm this)
Note: This post was generated by the Label Studio Archive Bot from a conversation in the Label Studio Slack, a gathering place for the Label Studio community. Someone in the community thought this was worth sharing!
If this post answered a question for you, hit the Like button - we use that to assess which posts to put into docs.