Skip to content

Examples

Moritz Wolf edited this page Apr 21, 2021 · 3 revisions

Picture Annotation:

  1. Copy and rename /example/protocol_example_picture.json to /protocol.json
  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.json to /protocol.json
  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 parsing.

{       
        "start": {
                "type": "loading",
                "transitions": [["onDone", "s0"]]
        },
        "s0": {
                "type": "read",
                "question": "Carefully read the comment and its context below.",
                "transitions": [["NEXT", "s1"]]

        },
        "s1": {
                "type": "boolean",
                "question": "Is this a hateful comment?",
                "column": "hateful",
                "saveAll": true,
                "transitions": [["YES", "s2"],
                                ["NO", "end"]]
        },
        "s2": {
                "type": "select",
                "question": "Who is the target?",
                "options": ["refugee", "politician", "other"],
                "nextState": "s3",
                "transitions": [["migrant"], ["save"],
                                ["politician", ["save"]],
                                ["other"]]
        },
        "s3": {
                "type": "checkmark",
                "question": "What are the topics of the comment?",
                "options": ["health", "economy", "environment", "other"],
                "transitions": [["NEXT", "s4", ["save"]]]
        },
        "s4": {
                "type": "label",
                "question": "Label all topics.",
                "transitions": [["NEXT", "end", ["save"]]]
                }
}

Clone this wiki locally