What makes us laugh? Investigations into Automatic Humor Classification

Vikram Ahuja, Taradheesh Bali, Navjyoti SinghNAACL 2018

TL;DR

This paper tackles the challenge of automatically classifying different types of jokes, moving beyond simple humor detection. The authors propose a novel framework that considers joke "mode," "theme," and "topic" to create a more comprehensive and adaptable system for humor classification, demonstrating its effectiveness on various joke sub-categories.

What Problem Does This Paper Address?

While detecting humor has been an area of research, classifying why something is funny or what kind of humor it is has remained largely unexplored. Existing theories of humor, like incongruity theory, script-based semantic theory (SSTH), and general verbal theory of humor (GVTH), offer explanations but struggle with the nuances and vast diversity of jokes. These theories often focus on a single source of humor (e.g., script opposition) and fail to adequately account for emotional responses or less conventional humor types like anti-humor and non-sequiturs. The authors aim to bridge this gap by developing a computational framework that can categorize jokes into various types and sub-types, addressing the limitations of previous approaches.

Methods

The paper proposes a new framework for humor classification that moves away from solely relying on script opposition. Instead, it focuses on three key characteristics of jokes:

  • Mode (Modus Operandi): How the joke is delivered (e.g., sarcastic, deadpan).
  • Theme: The underlying feeling or emotion conveyed by the joke.
  • Topic: The central element or "butt" of the joke, which can be based on stereotypes or situations.

This approach allows for a "flatter" classification structure, where jokes can belong to multiple categories simultaneously, unlike the hierarchical structures of previous theories. For computational implementation, the authors employ various machine learning techniques, including:

  • Topic Detection: LDA, Naive Bayes, and SVM, with and without proper noun boosting.
  • Sub-category Classification: Logistic Regression and SVM are used for detecting Sarcastic, Dark Humor, Adult Slang/Sexual Jokes, Gross Jokes, and Insult jokes. These classifiers leverage features like n-grams, sentiment scores, slang dictionaries, and specific word lists.
  • Feature Engineering: Techniques like tokenization, stemming, and the use of external knowledge bases (e.g., ConceptNet) are employed to extract relevant features from the jokes.

Datasets

The authors created and utilized several datasets for their experiments:

  • Topic Detection Dataset: Approximately 40,000 one-liner jokes collected from various joke websites, tagged with 25 common topics (e.g., Animal, Blonde, Food, Profession).
  • Sarcasm Detection Dataset: 5,000 jokes, with 2,500 positive (sarcastic) and 2,500 negative (non-sarcastic) instances, manually verified.
  • NSFW Jokes Dataset: 5,000 jokes, with 2,500 positive (adult/sexual) and 2,500 negative instances, collected from sources like the /r/dirtyjokes subreddit.
  • Insults Dataset: 2,000 positive (insult) and 2,000 manually created negative instances, sourced from /r/roastme.
  • Gross Jokes Dataset: 500 jokes with a "gross" tag and 500 non-gross jokes, totaling 1,000 jokes.
  • Dark Humor Dataset: 3,500 dark jokes and 3,500 randomly selected non-dark jokes.

Key Insights and Ideas

  • Beyond Script Opposition: The paper argues that humor is not solely derived from script opposition, but can arise from emotional incongruity and other mechanisms.
  • Holistic Approach: Classifying jokes based on their mode, theme, and topic provides a more comprehensive understanding than focusing on a single theoretical aspect.
  • Adaptability: The proposed framework is designed to be adaptable to new joke types and sub-categories, offering a more flexible approach than rigid, theory-bound models.
  • Sentiment as a Key Feature: Sentiment analysis proved to be a crucial feature for detecting certain joke types, particularly dark humor, where negative sentiment is a strong indicator.
  • Leveraging External Knowledge: The use of resources like ConceptNet and slang dictionaries significantly improved classification accuracy for specific joke categories.

Key Results

The paper reports promising results across various joke classification tasks:

  • Topic Detection: SVM with proper noun boosting achieved the highest accuracy at 76%.
  • Sarcastic Jokes: SVM with sentiment scores and n-grams reached 77% accuracy.
  • Dark Jokes: SVM with sentiment scores achieved 64% accuracy.
  • Adult Slang/Sexual Jokes: SVM with n-grams and a slang dictionary achieved the highest accuracy at 88%.
  • Gross Jokes: SVM with common gross words and sentiment achieved 67% accuracy.
  • Insult Jokes: SVM with insulting words and sentiment values achieved 79% accuracy.

Overall, SVM generally outperformed Logistic Regression and Naive Bayes across most categories. The introduction of sentiment scores and specialized dictionaries consistently improved accuracy.

Limitations and Future Work

  • Limitations: The authors acknowledge that the datasets, while substantial, may contain noise due to automatic collection. The current framework primarily focuses on one-liner jokes, and its applicability to longer narrative jokes or other forms of humor is yet to be fully explored.
  • Future Work: The authors suggest extending the framework to include more sub-categories and to distinguish between humorous and non-humorous content more broadly. They also propose applying the tool to analyze humor in longer media like movie or television show scripts, aiming for a more holistic classification of humor across different media. The versatility of their model allows for seamless integration of new sub-categories, with the primary impediment being the feasibility and computational resources required.

Summary updated

BibTeX
@inproceedings{ahuja2018what,
  author = {Vikram Ahuja and Taradheesh Bali and Navjyoti Singh},
  title = {{What makes us laugh? Investigations into Automatic Humor Classification}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
}

Loading related content...

Figure