File size: 8,987 Bytes
2f216d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6e72876
2f216d8
 
3f4bbb5
2f216d8
 
 
 
 
 
 
 
3f4bbb5
 
2f216d8
 
 
3f4bbb5
2f216d8
 
 
 
14a2c5e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2f216d8
3f4bbb5
71c2d73
3f4bbb5
 
 
 
 
 
1d3b38d
3f4bbb5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2f216d8
 
 
 
 
 
 
3f4bbb5
2f216d8
 
3f4bbb5
2f216d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
---
annotations_creators:
- no-annotation
language_creators:
- other
languages:
- ca
- en
- de
- es
- fr
- ru
- ja
- it
- zh
- pt
- nl
- tr
- pl
- vi
- ar
- id
- uk
- ro
- 'no'
- th
- sv
- el
- fi
- he
- da
- cs
- ko
- fa
- hi
- hu
- sk
- lt
- et
- hr
- is
- lv
- ms
- bg
- sr
- ca 
licenses:
- cc0-1.0
multilinguality:
- multilingual
pretty_name: MQA - a Multilingual FAQ and CQA Dataset
size_categories:
- unknown
source_datasets:
- original
task_categories:
- question-answering
task_ids:
- multiple-choice-qa
---
# MQA
MQA is a multilingual corpus of questions and answers parsed from the [Common Crawl](https://commoncrawl.org/). Questions are divided between *Frequently Asked Questions (FAQ)* pages and *Community Question Answering (CQA)* pages.
```
from datasets import load_dataset
all = load_dataset("clips/mqa", language="en")
{
  "name": "the title of the question (if any)",
  "text": "the body of the question (if any)",
  "answers": [{
    "text": "the text of the answer",
    "is_accepted": "true|false"
  }]
}
faq = load_dataset("clips/mqa", scope="faq", language="en")
cqa = load_dataset("clips/mqa", scope="cqa", language="en")
```

## Languages
We collected around **234M pairs** of questions and answers in **39 languages**. To download a language specific subset you need to specify the language key as configuration. See below for an example.
```
load_dataset("clips/mqa", language="en") # replace "en" by any language listed below
```

| Language            |   Questions       |   Answers           |   Pages             |   Domains |
|:--------------------|------------------:|--------------------:|--------------------:|---------:|
| en                  |       137,822,939 |         151,236,638 |          28,384,357 |  175,026 |
| de                  |        12,991,469 |          14,677,399 |           3,440,491 |   29,784 |
| es                  |        11,074,459 |          12,100,541 |           2,843,291 |   18,743 |
| fr                  |        10,317,588 |          14,952,761 |           3,060,417 |   19,138 |
| ru                  |        10,066,536 |          12,672,886 |           4,031,474 |   18,880 |
| ja                  |         5,937,927 |           8,854,124 |           2,387,580 |   11,398 |
| it                  |         5,054,493 |           5,812,885 |           1,338,489 |    9,295 |
| zh                  |         5,005,599 |           5,741,654 |           1,358,906 |    5,283 |
| pt                  |         4,213,838 |           4,525,732 |           1,224,703 |    6,908 |
| nl                  |         3,724,794 |           4,633,492 |           1,195,595 |   13,736 |
| tr                  |         3,044,839 |           4,378,115 |             894,573 |    6,178 |
| pl                  |         2,924,085 |           3,038,402 |             744,734 |    6,018 |
| vi                  |         2,103,839 |           2,190,328 |             525,418 |    6,634 |
| ar                  |         2,044,049 |           2,485,039 |             707,190 |    2,876 |
| id                  |         1,701,544 |           1,852,378 |             553,555 |    5,191 |
| uk                  |         1,432,987 |           1,448,816 |             389,539 |    3,382 |
| ro                  |         1,421,447 |           1,708,864 |             438,946 |    2,358 |
| no                  |         1,279,763 |           1,288,813 |             279,882 |    3,511 |
| th                  |         1,208,446 |           1,248,881 |             267,713 |    1,898 |
| sv                  |         1,138,954 |           1,146,543 |             240,501 |    4,405 |
| el                  |         1,125,998 |           1,134,091 |             209,976 |    1,849 |
| fi                  |         1,013,833 |           1,025,872 |             213,433 |    2,266 |
| he                  |           988,660 |           1,009,356 |             217,704 |    2,714 |
| da                  |           965,548 |             976,758 |             216,114 |    3,942 |
| cs                  |           859,778 |             992,455 |             260,186 |    2,440 |
| ko                  |           824,789 |             867,748 |             201,321 |    2,409 |
| fa                  |           716,294 |             835,540 |             319,874 |    7,679 |
| hi                  |           607,882 |           1,034,200 |             236,490 |    1,799 |
| hu                  |           508,450 |             515,383 |             137,361 |    2,094 |
| sk                  |           474,853 |             484,772 |              98,872 |    1,052 |
| lt                  |           397,850 |             397,914 |              80,184 |      596 |
| et                  |           286,598 |             287,578 |              64,601 |      668 |
| hr                  |           234,166 |             239,068 |              56,883 |    1,559 |
| is                  |           219,783 |             219,787 |              37,111 |      117 |
| lv                  |           213,581 |             213,661 |              39,320 |      373 |
| ms                  |           172,940 |             174,498 |              41,280 |      551 |
| bg                  |           118,083 |             122,536 |              28,423 |    1,757 |
| sr                  |            95,945 |              98,307 |              31,143 |    1,219 |
| ca                  |            67,061 |              68,216 |              13,409 |      550 |

## FAQ vs. CQA
You can download the *Frequently Asked Questions* (FAQ) or the *Community Question Answering* (CQA) part of the dataset.

```
faq = load_dataset("clips/mqa", scope="faq")
cqa = load_dataset("clips/mqa", scope="cqa")
all = load_dataset("clips/mqa", scope="all")
```
Although FAQ and CQA questions share the same structure, CQA questions can have multiple answers for a given questions, while FAQ questions have a single answer. FAQ questions typically only have a title (`name` key), while CQA have a title and a body (`name` and `text`).

## Nesting and Data Fields
You can specify three different nesting level: `question`, `page` and `domain`.
#### Question
```
load_dataset("clips/mqa", level="question") # default
```
The default level is the question object:
- **name**: the title of the question (if any)
- **text**: the body of the question (if any)
- **answers**: a list of answers
    - **text**: the title of the answer (if any)
    - **name**: the body of the answer
    - **is_accepted**: true if the answer is selected.

#### Page
This level returns a list of questions present on the same page. This is mostly useful for FAQs since CQAs already have one question per page.
```
load_dataset("clips/mqa", level="page")
```

#### Domain
This level returns a list of pages present on the web domain. This is a good way to cope with FAQs duplication by sampling one page per domain at each epoch.

```
load_dataset("clips/mqa", level="domain")
```

## Source Data

This section was adapted from the source data description of [OSCAR](https://huggingface.co/datasets/oscar#source-data)

Common Crawl is a non-profit foundation which produces and maintains an open repository of web crawled data that is both accessible and analysable. Common Crawl's complete web archive consists of petabytes of data collected over 8 years of web crawling. The repository contains raw web page HTML data (WARC files), metdata extracts (WAT files) and plain text extracts (WET files). The organisation's crawlers has always respected nofollow and robots.txt policies.

To construct MQA, we used the WARC files of Common Crawl.

## People
This model was developed by [Maxime De Bruyn](https://maximedb.vercel.app), Ehsan Lotfi, Jeska Buhmann and Walter Daelemans.

## Licensing Information
```
These data are released under this licensing scheme.
We do not own any of the text from which these data has been extracted.
We license the actual packaging of these data under the Creative Commons CC0 license ("no rights reserved") http://creativecommons.org/publicdomain/zero/1.0/

Should you consider that our data contains material that is owned by you and should therefore not be reproduced here, please:
* Clearly identify yourself, with detailed contact data such as an address, telephone number or email address at which you can be contacted.
* Clearly identify the copyrighted work claimed to be infringed.
* Clearly identify the material that is claimed to be infringing and information reasonably sufficient to allow us to locate the material.

We will comply to legitimate requests by removing the affected sources from the next release of the corpus.
```

## Citation information
```
@misc{debruyn2021mfaq,
      title={MFAQ: a Multilingual FAQ Dataset}, 
      author={Maxime {De Bruyn} and Ehsan Lotfi and Jeska Buhmann and Walter Daelemans},
      year={2021},
      eprint={2109.12870},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
```