Dropdown Options (search functionality, and dropdown for textcat)

Is it possible to search the dropdown options for longer lists of labels, and/or automatically alphabetize the labels? And is it possible to create a dropdown list for textcat? Thanks!

Hi! The labels are rendered in the order they come in, so you can provide them alphabetized if needed (either on the CLI or via a text file with one label per line). If you want to do this automatically, you can just call sorted() around the labels in the recipe function.

You could probably implement a dropdown or something like it with custom HTML and CSS, and make the change event of the <select> write to the current task JSON. So whenever something is selected in the dropdown, the selection will be reflected in the data.

That said, if your label scheme is so large that showing it all becomes inconvenient, it's often a sign that you might want to re-examine your labels and come up with a more efficient strategy. You can read more about this here: https://prodi.gy/docs/text-classification#large-label-sets

1 Like