Datasets:
Dataset Viewer
utterance
stringlengths 2
152
| label
sequencelengths 7
7
|
---|---|
i dont care | [
0,
0,
0,
1,
0,
0,
0
] |
can you please give me the address and the postcode | [
0,
0,
0,
0,
0,
1,
0
] |
alright thank you goodbye | [
0,
0,
1,
0,
0,
0,
1
] |
im looking for a moderately priced restaurant | [
0,
0,
0,
1,
0,
0,
0
] |
yes | [
0,
1,
0,
0,
0,
0,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
im looking for a fusion restaurant in the cheap price range | [
0,
0,
0,
1,
0,
0,
0
] |
whats the area | [
0,
0,
0,
0,
0,
1,
0
] |
moderate | [
0,
0,
0,
1,
0,
0,
0
] |
what is the address | [
0,
0,
0,
0,
0,
1,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
restaurant | [
0,
0,
0,
1,
0,
0,
0
] |
no | [
0,
0,
0,
0,
1,
0,
0
] |
looking for a restaurant | [
0,
0,
0,
1,
0,
0,
0
] |
turkish | [
0,
0,
0,
1,
0,
0,
0
] |
um phone number | [
0,
0,
0,
0,
0,
1,
0
] |
city center area | [
0,
0,
0,
1,
0,
0,
0
] |
whats the price of the venue | [
0,
0,
0,
0,
0,
1,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
ah chinese | [
0,
0,
0,
1,
0,
0,
0
] |
the fen ditton area | [
0,
0,
0,
1,
0,
0,
0
] |
moderate | [
0,
0,
0,
1,
0,
0,
0
] |
fenditton | [
0,
0,
0,
1,
0,
0,
0
] |
doesnt matter | [
0,
0,
0,
1,
0,
0,
0
] |
what part of town is it in | [
0,
0,
0,
0,
0,
1,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
im looking for a moderately priced pub and it should have a tv | [
0,
0,
0,
1,
0,
0,
0
] |
no | [
0,
0,
0,
0,
1,
0,
0
] |
need a place with tv | [
0,
0,
0,
1,
0,
0,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
expensive | [
0,
0,
0,
1,
0,
0,
0
] |
expensive | [
0,
0,
0,
1,
0,
0,
0
] |
romsey | [
0,
0,
0,
1,
0,
0,
0
] |
expensive restaruan in the romsey area | [
0,
0,
0,
1,
0,
0,
0
] |
what is the address | [
0,
0,
0,
0,
0,
1,
0
] |
what is the phone number | [
0,
0,
0,
0,
0,
1,
0
] |
whats the address | [
0,
0,
0,
0,
0,
1,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
a pub should have an internet connection | [
0,
0,
0,
1,
0,
0,
0
] |
price of the venue | [
0,
0,
0,
0,
0,
1,
0
] |
i would like to find a greek restaurant i need the phone number and the price | [
0,
0,
0,
1,
0,
1,
0
] |
i dont care about the price range | [
0,
0,
0,
1,
0,
0,
0
] |
free | [
0,
0,
0,
1,
0,
0,
0
] |
thank you goodbye | [
0,
0,
1,
0,
0,
0,
0
] |
im looking for an east asian restaurant that should be expensive | [
0,
0,
0,
1,
0,
0,
0
] |
any area | [
0,
0,
0,
1,
0,
0,
0
] |
east asian | [
0,
0,
0,
1,
0,
0,
0
] |
kettles yard | [
0,
0,
0,
1,
0,
0,
0
] |
what is its phone number | [
0,
0,
0,
0,
0,
1,
0
] |
thank you goodbye | [
0,
0,
1,
0,
0,
0,
0
] |
im looking for a drinks and snacks | [
0,
0,
0,
1,
0,
0,
0
] |
is in the riverside area | [
0,
0,
0,
1,
0,
0,
0
] |
um what is the address | [
0,
0,
0,
0,
0,
1,
0
] |
have the address phone number and price range | [
0,
0,
0,
0,
0,
1,
0
] |
expensive | [
0,
0,
0,
1,
0,
0,
0
] |
cheap | [
0,
0,
0,
1,
0,
0,
0
] |
newnham unintelligible | [
0,
0,
0,
1,
0,
0,
0
] |
can i have that in expensive price range | [
0,
0,
0,
1,
0,
0,
0
] |
whats the address | [
0,
0,
0,
0,
0,
1,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
im looking for a moderately priced restaurant in the addonsbrookes area | [
0,
0,
0,
1,
0,
0,
0
] |
it doesnt matter | [
0,
0,
0,
1,
0,
0,
0
] |
yes im looking for a moderately priced restaurant in the addonsbrookes area | [
0,
1,
0,
1,
0,
0,
0
] |
ok what is the address | [
1,
0,
0,
0,
0,
1,
0
] |
whats the phone number | [
0,
0,
0,
0,
0,
1,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
and the price range can be anything i dont ca | [
0,
0,
0,
1,
0,
0,
0
] |
no im not | [
0,
0,
0,
0,
1,
0,
0
] |
i do not care whether the children are allowed | [
0,
0,
0,
1,
0,
0,
0
] |
could you give me the address and the price range | [
0,
0,
0,
0,
0,
1,
0
] |
thank you good bye | [
0,
0,
1,
0,
0,
0,
0
] |
i want to find a pub that allows children and has a television | [
0,
0,
0,
1,
0,
0,
0
] |
yes | [
0,
1,
0,
0,
0,
0,
0
] |
free | [
0,
0,
0,
1,
0,
0,
0
] |
restaurants | [
0,
0,
0,
1,
0,
0,
0
] |
good bye | [
0,
0,
1,
0,
0,
0,
0
] |
free | [
0,
0,
0,
1,
0,
0,
0
] |
i dont care | [
0,
0,
0,
1,
0,
0,
0
] |
i dont care | [
0,
0,
0,
1,
0,
0,
0
] |
restaurant | [
0,
0,
0,
1,
0,
0,
0
] |
address | [
0,
0,
0,
0,
0,
1,
0
] |
good bye | [
0,
0,
1,
0,
0,
0,
0
] |
uh mediterranean restaurant | [
0,
0,
0,
1,
0,
0,
0
] |
i dont care | [
0,
0,
0,
1,
0,
0,
0
] |
what is the address | [
0,
0,
0,
0,
0,
1,
0
] |
what is the address | [
0,
0,
0,
0,
0,
1,
0
] |
looking for a mediterranean restaurant | [
0,
0,
0,
1,
0,
0,
0
] |
whats the phone number and price range | [
0,
0,
0,
0,
0,
1,
0
] |
i dont care about the price range | [
0,
0,
0,
1,
0,
0,
0
] |
i do not mind | [
0,
0,
0,
1,
0,
0,
0
] |
yes | [
0,
1,
0,
0,
0,
0,
0
] |
cherry hinton please | [
0,
0,
0,
1,
0,
0,
0
] |
english | [
0,
0,
0,
1,
0,
0,
0
] |
cherry hinton | [
0,
0,
0,
1,
0,
0,
0
] |
english | [
0,
0,
0,
1,
0,
0,
0
] |
no | [
0,
0,
0,
0,
1,
0,
0
] |
good bye | [
0,
0,
1,
0,
0,
0,
0
] |
i am looking for a pub with an internet connection | [
0,
0,
0,
1,
0,
0,
0
] |
ok | [
1,
0,
0,
0,
0,
0,
0
] |
wrong what is the address phone number | [
0,
0,
0,
0,
0,
1,
0
] |
End of preview. Expand
in Data Studio
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_hub("AutoIntent/dstc3")
Source
This dataset is taken from marcel-gohsen/dstc3
and formatted with our AutoIntent Library:
import datasets
from autointent import Dataset
from autointent.context.data_handler import split_dataset
def extract_intent_info(ds: datasets.Dataset) -> list[str]:
ds = ds.filter(lambda example: example["transcript"] != "")
intent_names = sorted(
set(name for intents in ds["intent"] for name in intents)
)
intent_names.remove("reqmore")
ds.filter(lambda example: "reqmore" in example["intent"])
return intent_names
def parse(ds: datasets.Dataset, intent_names: list[str]):
def transform(example: dict):
return {
"utterance": example["transcript"],
"label": [int(name in example["intent"]) for name in intent_names],
}
return ds.map(
transform, remove_columns=ds.features.keys()
)
def calc_fractions(ds: datasets.Dataset, intent_names: list[str]) -> list[float]:
res = [0] * len(intent_names)
for sample in ds:
for i, indicator in enumerate(sample["label"]):
res[i] += indicator
for i in range(len(intent_names)):
res[i] /= len(ds)
return res
def remove_low_resource_classes(ds: datasets.Dataset, intent_names: list[str], fraction_thresh: float = 0.01) -> tuple[list[dict], list[str]]:
remove_or_not = [(frac < fraction_thresh) for frac in calc_fractions(ds, intent_names)]
intent_names = [name for i, name in enumerate(intent_names) if not remove_or_not[i]]
res = []
for sample in ds:
if sum(sample["label"]) == 1 and remove_or_not[sample["label"].index(1)]:
continue
sample["label"] = [
indicator for indicator, low_resource in
zip(sample["label"], remove_or_not, strict=True) if not low_resource
]
res.append(sample)
return res, intent_names
def remove_oos(ds: datasets.Dataset):
return ds.filter(lambda sample: sum(sample["label"]) != 0)
if __name__ == "__main__":
dstc3 = datasets.load_dataset("marcel-gohsen/dstc3")
intent_names = extract_intent_info(dstc3["test"])
parsed = parse(dstc3["test"], intent_names)
filtered, intent_names = remove_low_resource_classes(remove_oos(parsed), intent_names)
intents = [{"id": i, "name": name} for i, name in enumerate(intent_names)]
dstc_final = Dataset.from_dict({"intents": intents, "train": filtered})
dstc_final["train"], dstc_final["test"] = split_dataset(
dstc_final, split="train", test_size=0.2, random_seed=42
)
- Downloads last month
- 102