Skip to content
Showcase/Detection and Interpretation of English Puns
intermediatetext

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.

PERORGLOCPERORGLOCDATESelect text to annotate

Fichier de configurationconfig.yaml

# 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

Données d'exemplesample-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 items

Obtenir ce design

View on GitHub

Clone or download from the repository

Démarrage rapide :

git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/semeval/2017/task07-pun-detection
potato start config.yaml

Détails

Types d'annotation

radiospan

Domaine

SemEvalNLPHumor DetectionFigurative Language

Cas d'utilisation

Pun DetectionWordplay AnalysisFigurative Language

Étiquettes

semevalsemeval-2017shared-taskpun-detectionwordplayhumorfigurative-language

Vous avez trouvé un problème ou souhaitez améliorer ce design ?

Ouvrir un ticket