File size: 2,604 Bytes
4ff17c5
 
 
769dc7f
4d4a7a1
af8809c
4d4a7a1
86c7d70
b0a33ec
86c7d70
b0a33ec
 
 
 
 
 
 
86c7d70
b0a33ec
86c7d70
 
4d4a7a1
 
 
 
 
86c7d70
b0a33ec
4d4a7a1
 
 
 
769dc7f
4d4a7a1
b0a33ec
 
 
 
 
 
 
 
 
 
 
 
 
 
4d4a7a1
 
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
---
license: mit
---
# Multilingual e-SNLI (MLe-SNLI)

In this repo, we provide the training, validation, and testing sets for **M**ulti**l**ingual **e-SNLI** (MLe-SNLI). For more details, find our report [here](https://github.com/rish-16/cs4248-project/blob/main/CS4248_Group19_Final_Report.pdf). 

## Dataset details
MLe-SNLI contains 500K training (`train`) samples of premise-hypothesis pairs along with their associated label and explanation. We take 100K training samples from the original e-SNLI (Camburu et al., 2018) dataset and translate them into 4 other languages (Spanish, German, Dutch, and French). We do the same for all 9824 testing (`test`) and validation (`dev`) samples, giving us 49120 samples for both `test` and `dev` splits.

| Column          | Description                                                                     |
|-----------------|---------------------------------------------------------------------------------|
| `premise`       | Natural language premise sentence                                               |
| `hypothesis`    | Natural language hypothesis sentence                                            |
| `label`         | From `entailment`, `contradiction`, or `neutral`                                |
| `explanation_1` | Natural language justification for `label`                                      |
| `language`      | From English (`en`), Spanish (`es`), German (`de`), Dutch (`nl`), French (`fr`) |

> **WARNING:** the translation quality of MLe-SNLI may be compromised for some natural language samples because of quality issues in the original e-SNLI dataset that were not addressed in our [work](https://github.com/rish-16/cs4248-project). Use it at your own discretion.

## Download Instructions
To access MLe-SNLI, you can use the HuggingFace Datasets API to load the dataset:

```python
from datasets import load_dataset

mle_snli = load_dataset("rish16/MLe-SNLI") # loads a DatasetDict object

train_data = mle_snli['train'] # 500K samples (100K per lang)
dev_data = mle_snli['dev'] # 49120 samples (9824 per lang)
test_data = mle_snli['test'] # 49120 samples (9824 per lang)

print (mle_snli)
"""
DatasetDict({
    train: Dataset({
        features: ['premise', 'hypothesis', 'label', 'explanation_1', 'language'],
        num_rows: 500000
    })
    test: Dataset({
        features: ['premise', 'hypothesis', 'label', 'explanation_1', 'language'],
        num_rows: 49120
    })
    validation: Dataset({
        features: ['premise', 'hypothesis', 'label', 'explanation_1', 'language'],
        num_rows: 49210
    })
})
"""
```