diff --git a/README.md b/README.md index b763f01e..5f65ffe3 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,14 @@ Potato aims to improve the replicability of data annotation and reduce the cost ![plot](./images/gif_reply.gif) +### Empathy as Appraisal (paired texts + likert) +[yaml config](https://github.com/davidjurgens/potato/tree/master/example-projects/empathy) | [Paper](https://aclanthology.org/2020.emnlp-main.45.pdf) + + [launch] python3 potato/flask_server.py example-projects/empathy/configs/empathy.yaml -p 8000 + [Annotate] http://localhost:8000/ +![plot](./images/empathy.png) + + ## Design Team and Support Potato is run by a small and engergetic team of academics doing the best they can. For support, please leave a issue on this git repo. Feature requests and issues are both welcomed! diff --git a/example-projects/empathy/configs/empathy.yaml b/example-projects/empathy/configs/empathy.yaml new file mode 100644 index 00000000..d5ddc8d5 --- /dev/null +++ b/example-projects/empathy/configs/empathy.yaml @@ -0,0 +1,80 @@ +{ + "annotation_task_name": "Empathy Annotation", + + # Potato will write the annotation file for all annotations to this + # directory, as well as per-annotator output files and state information + # necessary to restart annotation. + "output_annotation_dir": "annotation_output/empathy/", + + # The output format for the all-annotator data. Allowed formats are: + # * jsonl + # * json (same output as jsonl) + # * csv + # * tsv + # + "output_annotation_format": "csv", + + # If annotators are using a codebook, this will be linked at the top to the + # instance for easy access + "annotation_codebook_url": "", + + "data_files": [ + "example-projects/empathy/data_files/empathy.json" + ], + + # Both the target and observer comments are elements in a list referenced by the "text" key. + # See `example-projects/empathy/data_files/empathy.json` for details + "item_properties": { + "id_key": "id", + "text_key": "text", + }, + + # To convert the list into a string, we use `list_as_text` as shown below. + "list_as_text": { + "text_list_prefix_type": 'none', + }, + + + "user_config": { + "allow_all_users": True, + "users": [ ], + }, + + + "annotation_schemes": [ + { + "annotation_type": "likert", + "name": "rating", + "description": "To what extent does the observer's appraisal of the situation match that of the target speaker?", + "min_label": "Not at all", + "max_label": "Completely", + "size": 5, + "sequential_key_binding": True, + } + ], + + # The html that changes the visualiztation for your task. Change this file + # to influence the layout and description of your task. This is not a full + # HTML page, just the piece that does lays out your task's pieces + "html_layout": "templates/examples/plain_layout.html", + + # The core UI files for Potato. You should not need to change these normally. + # + # Exceptions to this might include: + # 1) You want to add custom CSS/fonts to style your task + # 2) Your layout requires additional JS/assets to render + # 3) You want to support additional keybinding magic + # + "base_html_template": "templates/base_template.html", + "header_file": "templates/header.html", + + + # How many seconds do you want the annotators spend on each instance, after + # that, an alert will be sent per alert_time_each_instance seconds. + "alert_time_each_instance": 10000000, + + + # This is where the actual HTML files will be generated + "site_dir": "potato/templates/", + +} diff --git a/example-projects/empathy/data_files/empathy.json b/example-projects/empathy/data_files/empathy.json new file mode 100644 index 00000000..7280b299 --- /dev/null +++ b/example-projects/empathy/data_files/empathy.json @@ -0,0 +1,2 @@ +{ "id": "0", "text": [ "Target: My cat died, and I feel very sad about it.", "Observer: Oh my gosh, I'm so sorry to hear that. When my cat died it really affected me, too."] } +{ "id": "1", "text": [ "Target: I just can't beat the third level of Super Mario Brothers and it's totally ruining my day.", "Observer: Ugh yeah, that's so frustrating."] } diff --git a/images/empathy.png b/images/empathy.png new file mode 100644 index 00000000..af0bfca6 Binary files /dev/null and b/images/empathy.png differ