File size: 9,654 Bytes
bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d bef71ce 89f8d9d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
---
language:
- ru
size_categories:
- 1K<n<10K
task_categories:
- text-classification
- question-answering
- text-generation
viewer: false
tags:
- humor
- humor interpretation
- automatic evaluation of interpretations
---
# KoWit-24: A Richly Annotated Dataset of Wordplay in News Headlines
[Paper](https://huggingface.co/papers/2503.01510) | [Code](https://github.com/Humor-Research/KoWit-24) | [🤗 Dataset](https://huggingface.co/datasets/Humor-Research/KoWit-24) | [Prompts](https://smith.langchain.com/hub/humor-research)
## Overview
We present KoWit-24, a dataset with fine-grained annotation of wordplay in 2,700 Russian news headlines. KoWit-24 annotations include the presence of wordplay, its type, wordplay anchors, and words/phrases the wordplay refers to.
## Dataset Description
Dataset contains manual annotated 2,700 headlines, of which 1,340 contained wordplay, so the dataset is almost perfectly balanced. For all headlines identified as containing wordplay, annotations were generated, including the original substring, a reference string, and a link to Wikipedia or Wiktionary. The most frequent wordplay mechanism in our dataset appeared to be the modification of existing well-known phrases – collocations, idiomatic expressions, or named entities.
### Key features
Unlike the majority of existing humor collections of canned jokes, KoWit-24 provides wordplay contexts – each headline is accompanied by the news lead and summary. The most common type of wordplay in the dataset is the transformation of collocations, idioms, and named entities – the mechanism that has been underrepresented in previous humor datasets. Moreover the dataset contains manually created annotations that provide information about what the wordplay refers to. Incorporating this annotation into the dataset **enables automated evaluation** of the large language model’s wordplay interpretations.
### Dataset Entry Example
```
{'article_url': 'https://www.kommersant.ru/doc/5051268',
'date': '2021-10-27',
'headline': 'Диалектический пиломатериализм',
'is_wordplay': True,
'lead': 'Цены на фанеру и доски начали снижаться вслед за спросом',
'summary': 'Пиломатериалы и лесопромышленная продукция начинают дешеветь по '
'мере завершения строительного сезона. По мнению аналитиков и '
'некоторых участников рынка, этому способствует сокращение спроса '
'на фоне летнего всплеска цен. И хотя на некоторые продукты, '
'например OSB, цена упала уже на треть, она все еще вдвое выше '
'уровня конца прошлого года. До конца года можно ожидать '
'стабилизации цен, полагают участники рынка, но едва ли '
'возвращения к средним многолетним значениям.'},
'annotations': [{'end_index': 30,
'headline_substring': 'Диалектический пиломатериализм',
'reference_string': 'Диалектический материализм',
'reference_url': 'https://ru.wikipedia.org/wiki/Диалектический_материализм',
'start_index': 0,
'wordplay_type': 'Reference'},
{'end_index': 30,
'headline_substring': 'пиломатериализм',
'reference_string': ['материализм', 'пиломатериалы'],
'reference_url': ['', ''],
'start_index': 15,
'wordplay_type': 'Nonce word'}]
```
## Dataset Statistics
The distribution of headlines by wordplay type can be seen in Table 1 below. The most frequent wordplay mechanism in our dataset appeared to be the modification of existing well-known phrases – collocations, idiomatic expressions, or named entities.
| | Wordplay type | # | AAL | Links |
|-----------------|---------------------|-----|------|-------|
| Puns | Polysemy | 190 | 1.51 | |
| Puns | Homonymy | 26 | 1.57 | |
| Puns | Phonetic similarity | 98 | 1.80 | |
| Transformations | Collocation | 423 | 2.64 | 126 |
| Transformations | Idiom | 177 | 3.43 | 118 |
| Transformations | Reference | 353 | 3.73 | 214 |
| | Nonce word | 185 | | |
| | Oxymoron | 48 | | |
*Table 1. Wordplay types, average anchor length in words (AAL), and wiki links in KoWit-24*
## How to Use
You can integrate **KoWit-24** into your projects by loading it with the Hugging Face `datasets` library:
```python
from datasets import load_dataset
data_files = {"test": "dataset.csv", "dev": "dev_dataset.csv"}
dataset = load_dataset("Humor-Research/KoWit-24", data_files=data_files)
```
### Sample Usage: Automatic Interpretation Evaluation
To facilitate the evaluation of other large language models (LLMs) and to ensure the reproducibility of the current predictions and metrics, an evaluation function has been implemented. First, install the evaluation package:
```bash
pip install git+https://github.com/Humor-Research/kowit24_evaluation.git
```
Then, you can use the following Python snippet to evaluate interpretations:
```python
import numpy as np
from datasets import load_dataset
from kowit24_evaluation import check_interpretation
data_files = {"test": "dataset.csv", "dev": "dev_dataset.csv"}
dataset = load_dataset("Humor-Research/KoWit-24", data_files=data_files)
llm_interpretations = LLM() # To perform the evaluation of the interpretations, consider that the texts of the interpretations have already been received
results = list()
for idx, example in enumerate(dataset["test"]):
results.append(
check_interpretation(example["annotations"], llm_interpretations[idx])
)
print("Quality", np.mean(results))
```
### Sample Usage: Running an experiment with another LLM
To facilitate the evaluation of alternative large language models (LLMs) for detection and interpretation tasks, the prompts utilized in the experiments have been made available on the LangChain Hub, while the corresponding data have been deposited on the HuggingFace Hub.
Example:
```python
# Imports
from huggingface_hub import hf_hub_download
from datasets import load_dataset
from langchain.llms import LlamaCpp
from langchain.chains import LLMChain
from langchain import hub
# Load model
model_path = hf_hub_download(repo_id="Vikhrmodels/Vikhr-Llama-3.2-1B-instruct-GGUF",
filename="Vikhr-Llama-3.2-1B-Q4_K_M.gguf",
local_dir=".")
llm = LlamaCpp(
model_path=model_path,
n_ctx=2048,
temperature=0.1,
top_p=0.9,
max_tokens=256
)
# Load prompt
prompt = hub.pull("humor-research/wordplay_detection")
# Load dataset
data_files = {"test": "dataset.csv", "dev": "dev_dataset.csv"}
dataset = load_dataset("Humor-Research/KoWit-24", data_files=data_files)
# Invoke LLM
predicted = list()
for example in dataset["test"]:
task = prompt.format(
headline=example["headline"],
lead=example["lead"]
)
predicted.append(
llm.invoke(task)
)
break
```
## Experiments and Results
For the experiments, we allocated 200 records (100 from each class) for the development set, making sure that all wordplay types were represented. Thus, the test set contains 2,500 headlines (1,290 with and 1,310 without wordplay). We experimented with two tasks – wordplay detection and wordplay interpretation. We employed five LLMs: GPT-4o, Mistral NeMo 12B, YandexGPT4, GigaChat Lite, and GigaChat Max.
### Table of Results
| Model | Detection with simple prompt, P/R | Detection with extended prompt, P/R | Interpretation manual, R | Interpretation auto, R |
|---------------|-----------------------------------|-------------------------------------|--------------------------|------------------------|
| GigaChat Lite | 0.50 / 0.50 | 0.53 / 0.72 | 0.11 | 0.19 |
| GigaChat Max | 0.62 / 0.48 | 0.68 / 0.59 | 0.28 | 0.28 |
| YandexGPT4 | 0.83 / 0.10 | 0.76 / 0.24 | 0.20 | 0.22 |
| Mistral Nemo | 0.00 / 0.00 | 0.00 / 0.00 | 0.24 | 0.30 |
| GPT-4o | 0.62 / 0.81 | 0.65 / 0.88 | 0.48 | 0.43 |
## Citation
If you use the KoWit-24 dataset in your research, please cite the following paper:
```bibtex
@misc{baranov2025kowit24richlyannotateddataset,
title={KoWit-24: A Richly Annotated Dataset of Wordplay in News Headlines},
author={Alexander Baranov and Anna Palatkina and Yulia Makovka and Pavel Braslavski},
year={2025},
eprint={2503.01510},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2503.01510},
}
``` |