Update README.md
Browse files
README.md
CHANGED
|
@@ -72,19 +72,4 @@ minds14 = Dataset.from_datasets("AutoIntent/minds14")
|
|
| 72 |
|
| 73 |
This dataset is taken from `PolyAI/minds14` and formatted with our [AutoIntent Library](https://deeppavlov.github.io/AutoIntent/index.html):
|
| 74 |
|
| 75 |
-
|
| 76 |
-
from datasets import load_dataset
|
| 77 |
-
from autointent import Dataset
|
| 78 |
-
|
| 79 |
-
def convert_minds14(minds14_train):
|
| 80 |
-
utterances = []
|
| 81 |
-
|
| 82 |
-
for batch in minds14_train.iter(batch_size=16, drop_last_batch=False):
|
| 83 |
-
for txt, intent_id in zip(batch["english_transcription"], batch["intent_class"], strict=False):
|
| 84 |
-
utterances.append({"utterance": txt, "label": intent_id})
|
| 85 |
-
|
| 86 |
-
return Dataset.from_dict({"train": utterances})
|
| 87 |
-
|
| 88 |
-
minds14 = load_dataset("PolyAI/minds14", "ru-RU", trust_remote_code=True)
|
| 89 |
-
minds14_converted = convert_minds14(minds14["train"])
|
| 90 |
-
```
|
|
|
|
| 72 |
|
| 73 |
This dataset is taken from `PolyAI/minds14` and formatted with our [AutoIntent Library](https://deeppavlov.github.io/AutoIntent/index.html):
|
| 74 |
|
| 75 |
+
Initial dataset contains train fold only, so our test fold is obtained via stratified splitting with `test_size=0.2`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|