Abstract
Yanyan Zou, Wei Lu. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers).
2019.
Introduction
Puns are a sophisticated form of wordplay where a word suggests multiple meanings through polysemy (homographic puns, e.g., "Some diets cause a gut reaction") or phonetic similarity (heterographic puns, e.g., "propane" vs. "profane").
In Natural Language Processing, this involves two distinct challenges: Pun Detection (identifying if a sentence contains a pun) and Pun Location (identifying the specific word triggering the pun). Traditionally, researchers treated these as separate tasks or used a "pipeline" approach. However, pipelines suffer from error propagation: if the detector fails, the locator never executes. This paper addresses these issues by proposing a unified, joint framework that treats pun processing as a sequence labeling task.
Methodology
The authors utilize a BiLSTM-CRF architecture to model the dependencies within a sentence and predict pun-related tags.
The BPA Tagging Scheme
The core innovation is the "Before-Pun-After" (BPA) tagging scheme. While a simple "Non-pun" vs. "Pun" (NP) scheme exists, the BPA scheme explicitly encodes the structural constraint that a sentence in their dataset contains at most one pun. By labeling words as 'B' (Before), 'P' (Pun), or 'A' (After), the model enforces a logical sequence: everything before the pun must be 'B' and everything after must be 'A'.
Model Architecture
- Input Layer: Combines pre-trained GloVe word embeddings with character-level embeddings to handle out-of-vocabulary words.
- Position Feature: A binary indicator feature is added to denote if a word is in the first or second half of a sentence, leveraging the statistical tendency for puns to appear at the end (the "punchline" effect).
- BiLSTM Layer: Captures long-range contextual dependencies from both directions.
- CRF Layer: Models the relationships between adjacent tags, ensuring the output sequence follows the BPA logic.
Results and Evaluation
The model was evaluated on the SemEval-2017 Task 7 benchmarks, consisting of homographic and heterographic datasets. The authors used 10-fold cross-validation to ensure robust results.
Performance Comparison
The joint model achieved new state-of-the-art (SOTA) results on several metrics. For homographic puns, the model achieved an $F_1$ score of 92.19 for detection and 79.20 for location. For heterographic puns, it achieved an $F_1$ of 89.76 for detection, becoming the top-performing neural approach in that category.
Key Insights
- Joint Learning Wins: Training on both tasks simultaneously allows the detection task to benefit from structural "clues" found during location.
- Structural Constraints Matter: The BPA scheme outperformed the simpler NP scheme by naturally enforcing the "one pun per sentence" rule, preventing the model from mistakenly tagging multiple words.
- The Position Signal: Ablation studies showed that removing the position feature (the "BPA-p" variant) caused a drop in performance, confirming that the "end-of-sentence" heuristic is a vital signal for identifying puns.
Conclusion and Future Work
By treating pun detection and location as a joint sequence labeling task, this research significantly improves the ability of neural models to process wordplay. While the model currently assumes a single pun per sentence and struggles with very short contexts, future work may involve incorporating richer semantic information and expanding the framework to handle multiple puns or different languages.
Summary updated