-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.2.2.1 supports displaying label suggestions
- Loading branch information
1 parent
b71ed96
commit 1986f56
Showing
10 changed files
with
1,238 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
110 changes: 110 additions & 0 deletions
110
project-hub/label_suggestions/configs/sentiment-analysis-preload.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"port": 9001, | ||
|
||
"server_name": "potato annotator", | ||
|
||
"annotation_task_name": "Sentiment Analysis", | ||
|
||
# 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/", | ||
|
||
# The output format for the all-annotator data. Allowed formats are: | ||
# * jsonl | ||
# * json (same output as jsonl) | ||
# * csv | ||
# * tsv | ||
# | ||
"output_annotation_format": "tsv", | ||
|
||
# If annotators are using a codebook, this will be linked at the top to the | ||
# instance for easy access | ||
"annotation_codebook_url": "", | ||
|
||
"data_files": [ | ||
"data_files/toy-example-with-suggested-labels.json" | ||
], | ||
|
||
"item_properties": { | ||
"id_key": "id", | ||
"text_key": "text", | ||
"context_key": "context" | ||
}, | ||
|
||
|
||
"user_config": { | ||
|
||
"allow_all_users": False, | ||
|
||
"authorized_users": ["pedropei@umich.edu"], | ||
}, | ||
|
||
# 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, | ||
|
||
|
||
"annotation_schemes": [ | ||
{ | ||
"annotation_type": "multiselect", | ||
"name": "sentiment", | ||
"description": "What kind of sentiment does the given text hold?", | ||
"labels": [ | ||
"positive", "neutral", "negative", | ||
], | ||
|
||
# If true, numbers [1-len(labels)] will be bound to each | ||
# label. Aannotations with more than 10 are not supported with this | ||
# simple keybinding and will need to use the full item specification | ||
# to bind all labels to keys. | ||
"sequential_key_binding": True, | ||
|
||
#how to display the suggestions, currently support: | ||
# "highlight": highlight the suggested labels with color | ||
# "pre-select": directly prefill the suggested labels or content | ||
# otherwise this feature is turned off | ||
"label_suggestions":"highlight" | ||
}, | ||
{ | ||
"annotation_type": "text", | ||
"name": "explanation", | ||
"description": "Why do you think so?", | ||
# if you want to use multi-line textbox, turn on the text area and set the desired rows and cols of the textbox | ||
"textarea": { | ||
"on": True, | ||
"rows": 2, | ||
"cols": 40 | ||
}, | ||
#how to display the suggestions, currently support: | ||
# "highlight": highlight the suggested labels with color | ||
# "pre-select": directly prefill the suggested labels or content | ||
# otherwise this feature is turned off | ||
"label_suggestions": "prefill" | ||
}, | ||
], | ||
|
||
# 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 | ||
# you may use templates in our lib, if you want to use your own template, | ||
# please replace the string as a path to the template | ||
"html_layout": "default", | ||
"surveyflow_html_layout": "fixed_keybinding", | ||
|
||
# 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 | ||
# | ||
# if you want to use your own template, | ||
# please replace the string as a path to the template | ||
"base_html_template": "default", | ||
"header_file": "default", | ||
|
||
# This is where the actual HTML files will be generated | ||
"site_dir": "default" | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
project-hub/label_suggestions/data_files/toy-example-with-suggested-labels.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"id":"1","text":"<div name=\"instance_text\" data-toggle=\"tooltip\" data-html=\"true\" data-placement=\"top\" data-original-title=\"test tool tip\">Tom: Isn't this awesome?!</div>","label_suggestions": {"sentiment": "positive", "explanation": "Because I think "}} | ||
{"id":"2","text":"<div name=\"instance_text\" data-toggle=\"tooltip\" data-html=\"true\" data-placement=\"top\" data-original-title=\"test tool tip\">Tom: Isn't this awesome?!</div>","label_suggestions": {"sentiment": "negative"}} | ||
{"id":"3","text":"<div name=\"instance_text\" data-toggle=\"tooltip\" data-html=\"true\" data-placement=\"top\" data-original-title=\"test tool tip\">Tom: Isn't this awesome?!</div>","label_suggestions": {"sentiment": "positive"}} |
Oops, something went wrong.