I had some trouble with identifying which one of them is the best for my annotation and feels like choice and textcat.manual are basically the same thing (I feel like they both just give you the text and two choices and ask you to select). Also, I don't know how to use text (like what the code is).
Welcome to the forum @Lisa_yang
I think the first important concept to clarify is the difference between Prodigy recipe and Prodigy interface (or UI).
Prodigy recipe is a python script that loads the data, preprocesses so that it fits the required Prodigy interface and defines any other configuration settings.
textcat.manual
is a recipe while choice
and text
are Prodigy interfaces. You can find out the details on the expected data format for these (and other) Prodigy interfaces in our docs for annotation UIs. This is where you can find information on how to use text
interface.
choice
is one of the interfaces that the textcat.manual
recipe can use. choice
is used to provide multiple-choice-like questions and will be triggered if you provide more than one label on the textcat.manual
command.
Another interface used by textcat.manual
is classification
- this is meant for binary yes/no annotation (is it this label or not) and will be triggered if there's only one label on the textcat.manual
command.
You can find more details in our docs on textcat.manual
Maybe if you provide some more details on your annotation task we can help you to choose the right Prodigy recipe for it?
Thank you so much! May I ask how to implement the choice/text interface (or where can I find the code)? Thank you!
Hi @Lisa_yang,
The choice
and text
interfaces are already implemented and available in Prodigy.
To use choice
interface with textcat.manual
you just need to make sure your input data is JSONL file with text under text
key, so:
{"text": "This my example number 1"}
{"text": "This my example number 2"}
...
And then on the command line you should provide multiple labels which will be used as options to choose from. For example:
prodigy textcat.manual news_topics ./news_headlines.jsonl --label Technology,Politics,Economy,Entertainment
There are also different ways of customizing it, for example by specifying whether the user should be able to mark multiple categories. Please see the docs for details.
text
UI is meant for annotating plain text. You can try it out with Prodigy mark
recipe or implement a custom recipe that uses it. In fact, you can implement a custom recipe that uses any Prodigy interface including choice
. For exhaustive information with code examples on how to implement a custom Prodigy recipe, please see here.
Got it. Thank you so much for your help!!!