Editor configuration is based on XML-like tags. Tags can be divided into three categories:
- Visual tags used for visual only elements (non-interactive), examples: View, Header.
- Control tags used to label the objects, examples: Labels, Choices, Rating, TextArea.
- Object tags used to show elements that can be labeled: Image, Text, Audio, AudioPlus.
The name attribute is mandatory for all control and object tags. Also, each control tag should have toName attribute that should match the name parameter in the object element. For example:
<View>
<Labels name="lbl" toName="txt">
<Label value="Label 1"></Label>
<Label value="Label 2"></Label>
</Labels>
<Text name="txt" value="$value"></Text>
</View>
Note that in the case above Labels tags is used to label Text tag. There could be multiple control, and object tags in the same configuration and names are used to connect them.
Here is an example of two-column labeling interface with multiple control and object elements:
<View style="display: flex;">
<View style="flex: 50%">
<Header value="Choose:"></Header>
<Text name="txt-1" value="$value"></Text>
<Choices name="chc" toName="txt-1">
<Choice value="Choice 1"></Choice>
<Choice value="Choice 2"></Choice>
</Choices>
</View>
<View style="flex: 50%; margin-left: 1em">
<Header value="Enter your question and rate text:"></Header>
<Text name="txt-2" value="$value"></Text>
<Rating name="rating" toName="txt-2"></Rating>
<TextArea name="question" ></TextArea>
</View>
</View>
- Choice
- Choices
- Label
- Labels
- List
- Polygon
- PolygonLabels
- Ranker
- Rating
- Rectangle
- RectangleLabels
- TextArea
- Audio
- AudioPlus
- Image
- Text
- Header
- Table
- View
Choice tag represents a single choice
value
[string] label valueselected
[boolean]? If this label should be preselectedalias
[string]? label aliashotkey
[string]? hokey
<View>
<Choices name="gender" toName="txt-1" choice="single">
<Choice alias="M" value="Male"></Choice>
<Choice alias="F" value="Female"></Choice>
</Choices>
<Text name="txt-1" value="John went to see Marry"></Text>
</View>
Choices tag, create a group of choices, radio, or checkboxes. Shall be used for a single or multi-class classification.
name
[string] of the grouptoName
[string] name of the elements that you want to labelchoice
(single | single-radio | multiple) single or multi-class (optional, defaultsingle
)showInline
[boolean] show items in the same visual line
<View>
<Choices name="gender" toName="txt-1" choice="single-radio">
<Choice alias="M" value="Male"></Choice>
<Choice alias="F" value="Female"></Choice>
</Choices>
<Text name="txt-1" value="John went to see Marry"></Text>
</View>
Label tag represents a single label
value
[string] A value of the labelselected
[boolean] If this label should be preselectedalias
[string] Label aliashotkey
[string] Hotkeyshowalias
[boolean] Show alias inside label textaliasstyle
[string] Alias CSS style default=opacity: 0.6size
[string] Size of text in the labelbackground
[string] The background color of active labelselectedColor
[string] Color of text in an active label
<View>
<Labels name="type" toName="txt-1">
<Label alias="B" value="Brand"></Label>
<Label alias="P" value="Product"></Label>
</Labels>
<Text name="txt-1" value="$text"></Text>
</View>
Labels tag, create a group of labels
name
[string] name of the elementtoName
[string] name of the element that you want to labelchoice
(single | multiple) configure if you can select just one or multiple labels (optional, defaultsingle
)
<View>
<Labels name="type" toName="txt-1">
<Label alias="B" value="Brand"></Label>
<Label alias="P" value="Product"></Label>
</Labels>
<Text name="txt-1" value="$text"></Text>
</View>
List element, used for ranking results. Great choice for recomendation systems.
elementValue
[string] lookup key for child objectelementTag
([Text] | [Image] | [Audio]) element used to render childrenvalue
[string] list valuename
[string] of groupsortedHighlightColor
[string]? coloraxis
[string]? axis used for drag-n-droplockAxis
[string]? lock axis
<View>
<HyperText value="$markup"></HyperText>
<List name="ranker" value="$replies" elementValue="$text" elementTag="Text" ranked="true" sortedHighlightColor="#fcfff5"></List>
</View>
Polygon tag Polygon is used to add polygons to an image
name
[string] name of tagtoname
[string] name of image to labelopacity
[number] opacity of polygon (optional, default0.6
)fillColor
[string]? rectangle fill color, default is transparentstrokeColor
[string]? stroke colorstrokeWidth
[number] width of stroke (optional, default1
)pointSize
(small | medium | large) size of polygon handle points (optional, defaultmedium
)pointStyle
(rectangle | circle) style of points (optional, defaultrectangle
)
<View>
<Polygon name="rect-1" toName="img-1" value="Add Rectangle"></Polygon>
<Image name="img-1" value="$img"></Image>
</View>
PolygonLabels tag, create labeled polygons
name
[string] name of tagtoname
[string] name of image to labelopacity
[number] opacity of polygon (optional, default0.6
)fillColor
[string]? rectangle fill color, default is transparentstrokeColor
[string]? stroke colorstrokeWidth
[number] width of stroke (optional, default1
)pointSize
(small | medium | large) size of polygon handle points (optional, defaultmedium
)pointStyle
(rectangle | circle) style of points (optional, defaultrectangle
)
<View>
<Image name="image" value="$image"></Image>
<PolygonLabels name="lables" toName="image">
<Label value="Car"></Label>
<Label value="Sign"></Label>
</PolygonLabels>
</View>
Ranker tag, used to ranking models
name
[string] of groupaxis
(y | x) axis direction (optional, defaulty
)sortedHighlightColor
[string] sorted color
<View>
<Ranker name="ranker" value="$items"></Ranker>
</View>
Rating tag
name
[string] of the elementtoName
[string] name of the element that you want to labelmaxRating
integer maxmium rating value (optional, default5
)size
[string] one of: mini tiny small large huge massive (optional, defaultlarge
)icon
[string] one of: star heart (optional, defaultstar
)hotkey
[string]? hokey
<View>
<Text name="txt" value="$text"></Text>
<Rating name="rating" toName="txt" maxRating="10"></Rating>
</View>
Rectangle tag Rectangle is used to add rectangle (BBox) to an image
name
[string] name of the elementtoname
[string] name of the image to labelopacity
float opacity of rectangle (optional, default0.6
)fillColor
[string]? rectangle fill color, default is transparentstrokeColor
[string]? stroke colorstrokeWidth
[number] width of the stroke (optional, default1
)canRotate
[boolean] show or hide rotation handle (optional, defaulttrue
)
<View>
<Rectangle name="rect-1" toName="img-1"></Rectangle>
<Image name="img-1" value="$img"></Image>
</View>
RectangleLabels tag creates labeled rectangles
name
[string] name of the elementtoname
[string] name of the image to labelopacity
float opacity of rectangle (optional, default0.6
)fillColor
[string]? rectangle fill color, default is transparentstrokeColor
[string]? stroke colorstrokeWidth
[number] width of stroke (optional, default1
)canRotate
[boolean] show or hide rotation handle (optional, defaulttrue
)
<View>
<RectangleLabels name="labels" toName="image">
<Label value="Person"></Label>
<Label value="Animal"></Label>
</RectangleLabels>
<Image name="image" value="$image"></Image>
</View>
TextArea tag shows the textarea for user input
name
[string] name of the elementtoName
[string] name of the element that you want to label if anyvalue
[string]label
[string]? label textplaceholder
[string]? placeholder textmaxSubmissions
[string]? maximum number of submissions
<View>
<TextArea name="ta"></TextArea>
</View>
Audio tag plays a simple audio file
name
[string] of the elementvalue
[string] of the elementhotkey
[string] hotkey used to play/pause audio
<View>
<Audio name="audio" value="$audio"></Audio>
</View>
<!-- Audio classification -->
<View>
<Audio name="audio" value="$audio"></Audio>
<Choices name="ch" toName="audio">
<Choice value="Positive"></Choice>
<Choice value="Negative"></Choice>
</Choices>
</View>
<!-- Audio transcription -->
<View>
<Audio name="audio" value="$audio"></Audio>
<TextArea name="ta" toName="audio"></TextArea>
</View>
AudioPlus tag plays audio and shows its wave
name
[string] of the elementvalue
[string] of the elementhasZoom
[boolean] speficy if audio has zoom functionalityregionBG
[string] region colorselectedRegionBG
[string] selected region background
<View>
<Labels name="lbl-1" toName="audio-1"><Label value="Hello"></Label><Label value="World"></Label></Labels>
<Rating name="rate-1" toName="audio-1"></Rating>
<AudioPlus name="audio-1" value="$audio"></AudioPlus>
</View>
Image tag shows an image on the page
name
[string] name of the elementvalue
[string] valuewidth
[string] image width (optional, default100%
)maxWidth
[string] image maximum width (optional, default750px
)
<View>
<Image value="$url"></Image>
</View>
<View>
<Image value="https://imgflip.com/s/meme/Leonardo-Dicaprio-Cheers.jpg" width="100%" maxWidth="750px"></Image>
</View>
Text tag shows a text that can be labeled
name
[string] of the elementvalue
[string] of the elementselelectWithoutLabel
[boolean] controls if text can be selected without any labels selected
<Text name="text-1" value="$text"></Text>
Header tag, show header
size
[string] Size of headervalue
[string] Text of headerunderline
[boolean] Underline of header
<Header name="text-1" value="$text"></Header>
HyperText element. Render html inside
name
[string]value
[string]
<View>
<HyperText value="<p>Hey</p>"></HyperText>
<View>
Table tag, show object keys and values in a table
value
[string]
<Table name="text-1" value="$text"></Table>
View element. It's analogous to div element in html and can be used to visual configure display of blocks
display
(block | inline)backgroundColor
hexColor background colorstyle
style css style string
<View style="display: flex;">
<View style="flex: 50%">
<Header value="Facts:"></Header>
<Text name="text" value="$fact"></Text>
</View>
<View style="flex: 50%; margin-left: 1em">
<Header value="Enter your question:"></Header>
<TextArea name="question" ></TextArea>
</View>
</View>