Detection and Interpretation of English Puns
Detection of puns in text with identification of the specific pun word, combining binary classification with span annotation. Based on SemEval-2017 Task 7.
Configuration Fileconfig.yaml
This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.
# Detection and Interpretation of English Puns
# Based on Miller et al., SemEval 2017
# Paper: https://aclanthology.org/S17-2005/
# Dataset: https://alt.qcri.org/semeval2017/task7/
#
# This task asks annotators to determine whether a sentence contains a
# pun, and if so, to highlight the specific word that creates the pun.
#
# Pun Detection Labels:
# - Contains Pun: The sentence contains wordplay or a pun
# - No Pun: The sentence does not contain a pun
#
# Span Label:
# - Pun Word: The specific word that creates the pun
annotation_task_name: "Detection and Interpretation of English Puns"
task_dir: "."
data_files:
- sample-data.json
item_properties:
id_key: "id"
text_key: "text"
output_annotation_dir: "annotation_output/"
output_annotation_format: "json"
port: 8000
server_name: localhost
annotation_schemes:
- annotation_type: radio
name: pun_detection
description: "Does this sentence contain a pun?"
labels:
- "Contains Pun"
- "No Pun"
keyboard_shortcuts:
"Contains Pun": "1"
"No Pun": "2"
tooltips:
"Contains Pun": "The sentence contains wordplay exploiting multiple meanings of a word"
"No Pun": "The sentence is straightforward with no wordplay"
- annotation_type: span
name: pun_word
description: "If a pun is present, highlight the specific word that creates the pun."
labels:
- "Pun Word"
annotation_instructions: |
You will be shown a sentence. Your task is to:
1. Determine whether the sentence contains a pun (wordplay that exploits multiple
meanings or similar-sounding words for humorous effect).
2. If a pun is present, highlight the specific word that creates the pun.
html_layout: |
<div style="padding: 15px; max-width: 800px; margin: auto;">
<div style="background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
<strong style="color: #0369a1;">Sentence:</strong>
<p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{text}}</p>
</div>
</div>
allow_all_users: true
instances_per_annotator: 50
annotation_per_instance: 2
allow_skip: true
skip_reason_required: false
Sample Datasample-data.json
[
{
"id": "pun_001",
"text": "I used to be a banker, but I lost interest."
},
{
"id": "pun_002",
"text": "The meeting was scheduled for 3 PM in the main conference room on the second floor."
}
]
// ... and 8 more itemsGet This Design
Clone or download from the repository
Quick start:
git clone https://github.com/davidjurgens/potato-showcase.git cd potato-showcase/semeval/2017/task07-pun-detection potato start config.yaml
Dataset & paper
Miller et al., SemEval 2017
Citation (BibTeX)
@inproceedings{miller-etal-2017-semeval,
title = "{S}em{E}val-2017 Task 7: Detection and Interpretation of {E}nglish Puns",
author = "Miller, Tristan and Hempelmann, Christian and Gurevych, Iryna",
booktitle = "Proceedings of the 11th International Workshop on Semantic Evaluation ({S}em{E}val-2017)",
year = "2017",
publisher = "Association for Computational Linguistics",
pages = "58--68",
doi = "10.18653/v1/S17-2005",
url = "https://aclanthology.org/S17-2005"
}Details
Annotation Types
Domain
Use Cases
Tags
Found an issue or want to improve this design?
Open an IssueRelated Designs
Aspect-Based Sentiment Analysis
Identification of aspect terms in review text with sentiment polarity classification for each aspect. Based on SemEval-2016 Task 5 (ABSA).
Character Identification on Multiparty Dialogues
Identification and linking of character mentions in TV show dialogue, combining span annotation with entity resolution for the main cast of Friends. Based on SemEval-2018 Task 4.
Clickbait Spoiling
Classification and extraction of spoilers for clickbait posts, including spoiler type identification and span-level spoiler detection. Based on SemEval-2023 Task 5 (Fröbe et al.).