crowd-classifier
A widget for classifying non-image content, such as audio, video, or text.
See an interactive example of an HTML template that uses this Crowd HTML Element in CodePen
The following is an example of an HTML worker task template built using
crowd-classifier
. This example uses the Liquid template language
-
Label categories in the
categories
parameter -
The objects that are being classified in the
classification-target
parameter.
Copy the following code and save it in a file with the extension .html
. Open the
file in any browser to preview and interact with this template.
Attributes
The following attributes are supported by this element.
categories
A JSON formatted array of strings, each of which is a category that a worker can assign to the text. You should include "other" as a category, otherwise the worker my not be able to provide an answer.
header
The text to display above the image. This is typically a question or simple instruction for the worker.
name
The name of this widget. It is used as a key for the widget's input in the form output.
Element Hierarchy
This element has the following parent and child elements.
-
Parent elements: crowd-form
-
Child elements: classification-target, full-instructions, short-instructions
Regions
The following regions are supported by this element.
classification-target
The content to be classified by the worker. This can be plain text or HTML. Examples of how the HTML can be used include but are not limited to embedding a video or audio player, embedding a PDF, or performing a comparison of two or more images.
full-instructions
General instructions about how to do text classification.
short-instructions
Important task-specific instructions that are displayed in a prominent place.
Output
The output of this element is an object using the specified name
value as a property name, and a string from the categories
as the property's value.
Example : Sample Element Outputs
The following is a sample of output from this element.
[ { "
<name>
": { "label": "<value>
" } } ]
See Also
For more information, see the following.