Datasets:
metadata
dataset_info:
- config_name: default
features:
- name: utterance
dtype: string
- name: label
sequence: int64
splits:
- name: train
num_bytes: 2163109
num_examples: 16077
download_size: 444270
dataset_size: 2177768.2414629594
- config_name: intents
features:
- name: id
dtype: int64
- name: name
dtype: string
- name: tags
sequence: 'null'
- name: regexp_full_match
sequence: 'null'
- name: regexp_partial_match
sequence: 'null'
- name: description
dtype: 'null'
splits:
- name: intents
num_bytes: 387
num_examples: 13
download_size: 3096
dataset_size: 387
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- config_name: intents
data_files:
- split: intents
path: intents/intents-*
task_categories:
- text-classification
language:
- en
dstc3
This is a text classification dataset. It is intended for machine learning research and experimentation.
This dataset is obtained via formatting another publicly available data to be compatible with our AutoIntent Library.
Usage
It is intended to be used with our AutoIntent Library:
from autointent import Dataset
dstc3 = Dataset.from_datasets("AutoIntent/dstc3")
Source
This dataset is taken from marcel-gohsen/dstc3
and formatted with our AutoIntent Library:
from datasets import load_dataset
from autointent import Dataset
# load original data
dstc3 = load_dataset("marcel-gohsen/dstc3")
# extract intent names
dstc3["test"] = dstc3["test"].filter(lambda example: example["transcript"] != "")
intent_names = sorted(set(name for intents in dstc3["test"]["intent"] for name in intents))
intent_names.remove("reqmore")
dstc3["test"].filter(lambda example: "reqmore" in example["intent"])
name_to_id = {name: i for i, name in enumerate(intent_names)}
# parse complicated dstc format
def transform(example: dict):
return {
"utterance": example["transcript"],
"label": [name_to_id[intent_name] for intent_name in example["intent"] if intent_name != "reqmore"],
}
dstc_converted = dstc3["test"].map(transform, remove_columns=dstc3["test"].features.keys())
# format to autointent.Dataset
intents = [{"id": i, "name": name} for i, name in enumerate(intent_names)]
utterances = []
oos_utterances = []
for rec in dstc_converted.to_list():
if len(rec["label"]) == 0:
rec.pop("label")
oos_utterances.append(rec["utterance"])
else:
utterances.append(rec)
oos_records = [{"utterance": ut} for ut in set(oos_utterances)]
dstc_converted = Dataset.from_dict({"intents": intents, "train": utterances + oos_records})