task_categories:conversational task_categories:text-generation task_categories:text2text-generation task_categories:text-classification size_categories:n<1K language:ru region:us
---
task_categories:
- conversational
- text-generation
- text2text-generation
- text-classification
language:
- ru
pretty_name: Funny-responses
size_categories:
- n<1K
---
# Funniest responses dataset
This crowdsourced dataset is a dataset of the funny answers we've collected over time. The collection started in feb. 8 of 2023.

# Usage

## Data structure
Here's how the data looks.
```json
[
  {"text": "How's your day?", "response": "Better than yours.", "type": "a"},
  {"text": "I'm just going to start flying in some direction", "response": "Down.", "type": "n"},
...
```
The json is a list of dictionaries that have keys "text", "response", "type". Here's a list of all the types:
 - "n" Neutral, no offense.
 - "a" Agressive/offensive/toxic response.
 - "w" Contains a response with not always appropriate or aggresive words but not swearing (like "frik" or "crap" or "dumbass")
 - "s" The entire sample contains swearing. (Means the text or response contains swearing. I don't think examples are required)
 - "p" Pissimistic, can include low self-esteem, suicide, etc. (like "Why is this thing not working??" with a response "Unemployed just like me...")

## Datasets library
Here is the code to use this dataset with `datasets` for a classifier of text toxicity.
```py
from datasets import load_dataset
import numpy as np
from keras.preprocessing.text import Tokenizer

dset = load_dataset("MoyAI/Funniest-answers")['train']

tokenizer = Tokenizer()

type_toxicity = {"n": 0, "p": 0.2, "w": 0.5, "a": 0.7, "s": 1}

tokenizer.fit_on_texts(dset['response'])

X = tokenizer.texts_to_sequences(dset['response'])
y = np.array([type_toxicity[type] for type in dset['type']])
```