Follow

Guide to: CML Attributes

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, and cml:option children tags) can have a label attribute. This will be displayed next to the generated question. If no name attribute is specified on a parent tag, the label 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 the cml:checkbox and cml:radio child tags can have a name 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, and cml:option) can be set with a value. The value of value will determine the output of that particular response in your generated CSV. Please note that any spaces in value attributes will not be accepted, as they will break any test questions created. Instead, please use underscores as spaces within value attributes (ex:"type_of_sentiment"). If no value is specified for a child element, the value of label 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 of cml:select (cml:option) if Google translate is not disabled for the job. If a contributor translates the page while submitting a cml: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 incml:textarea,cml:text, andcml:checkboxes. When used on cml:textarea or cml: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 an instructions attribute and a cml: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.

  


Was this article helpful?
7 out of 12 found this helpful


Have more questions? Submit a request
Powered by Zendesk