These attributes can be used within the opening tag for a CML question:
label
- Every CML question parent tag (along with the
cml:checkbox
,cml:radio
, andcml:option
children tags) can have alabel
attribute. This will be displayed next to the generated question. If noname
attribute is specified on a parent tag, thelabel
will be converted into a name by removing non-alpha-numeric characters and replacing spaces with an underscore.
name
- Every CML question parent tag (except
cml:group
) along with thecml:checkbox
andcml:radio
child tags can have aname
attribute. This must be unique across all other question tags in the job. The name should not contain capital letters, spaces, or non-alpha-numeric characters. This will become the header of a column in your generated CSV containing the responses for this particular element.
value
- Every CML questions child tag (
cml:checkbox
,cml:radio
, andcml:option
) can be set with avalue
. The value ofvalue
will determine the output of that particular response in your generated CSV. Please note that any spaces invalue
attributes will not be accepted, as they will break any test questions created. Instead, please use underscores as spaces withinvalue
attributes (ex:"type_of_sentiment"). If novalue
is specified for a child element, the value oflabel
will be reformatted and used instead. -
Note: While the
value
attribute is not required, it is highly recommended to include in CML questions child tags ofcml:select
(cml:option
) if Google translate is not disabled for the job. If a contributor translates the page while submitting acml:option
without a hardcoded value attribute, the results will return the answer in the translated language.
default
- This will allow you to set a default response that will be selected or displayed (in the case of text input) on page-load. This can be used in
cml:textarea
,cml:text
, andcml:checkboxes
. When used oncml:textarea
orcml:text
, this provides an example input for the user and disappears once the user click into the text box. If not present,default="false"
.
instructions
- Every CML questions parent tag can have an
instructions
attribute. This will be displayed next to the generated questions to help clarify the desired input. If both aninstructions
attribute and acml:instructions
tag is specified, only the value of the attribute will be used.
only-if
- Every CML questions parent tag can have an
only-if
attribute. The value of this attribute should be the name of the field a user must complete before this field or group of fields will be displayed. To designate logic based on specific responses in a question, take a look at this article on CML Logic.
validates
- Every CML questions parent tag can have a
validates
attribute. This attribute enforces the specified validations to occur on this questions. Take a look at this article on validations for more details.
Complex Use Cases:
For use cases that require ADAP annotation tools the following are common attributes that are shared amongst most of the annotation tools:
source-data
References the name of the source data column containing the data to be annotated.
review-data
References the name of the source data column containing pre-annotated data to be rendered in the tool. The format of pre-annotated data matters, check with the respective tool guide in the Success Center to see an example of what the format should be. Ex. Bounding Box sample in article.
task-type
This attribute must be used in conjunction with review-data
. As a standard with all annotation tools the task-type
must be set equal to "qa"
.
For Tool specific attributes, please visit the “Guide to:” pages at the link here for more information. If you have questions about CML attributes, where and how they should be used, please reach out to your CSM.