Skip to content

Examples

Moritz Wolf edited this page Feb 2, 2022 · 3 revisions

Picture Annotation:

  1. Copy and rename /example/protocol_example_picture.yml to /protocol.yml
  2. Run setup.sh
  3. Log in with your administrator account and upload the folder /example/picture
  4. Upload the file /example/data_example_picture.csv
  5. Go back to home and start annotating.

Text Annotation:

  1. Copy and rename /example/protocol_example_text.yml to /protocol.yml
  2. Run setup.sh
  3. Log in with your administrator account and upload the file /example/data_example_text.csv
  4. Go back to home and start annotating.

Example Code

An example of a full AP ready for deployment:

%YAML 1.2
---
start:
    type: loadText
    transitions:
        - next:
              target: 'hateful'

'hateful':
    type: boolean
    question: Is this a hateful comment?
    column: test
    transitions:
        - 'YES':
              target: 'primary_target'
        - 'NO':
              target: 'end'

'primary_target':
    type: select
    question: Who is the primary target?
    options: ['refugee', 'politician', 'other']
    transitions:
        - '*':
              target: 'targets'

'targets':
    type: checkmark
    question: Check all targets.
    options: ['refugee', 'politician', 'other']
    transitions:
        - '*':
              target: 'labels'

'labels':
    type: labelText
    question: Label all targets in the text.
    from: 'targets'
    # options: ['refugee', 'politician']
    transitions:
        - '*':
              target: end

Clone this wiki locally