CoolFace
Datasetpublic

uvira007/stackexchange_title_best_voted_answer_jsonl

This new dataset is designed to solve this great NLP task and is crafted with a lot of care.

sourceHugging Facecc-by-nc-sa-4.0updated 7mo agoView on Hugging Face
0likes4downloads
Dataset Card

Dataset Card Creation Guide

Table of Contents

Dataset Description

Dataset Summary

We automatically extracted question and answer (Q&A) pairs from Stack Exchange network. Stack Exchange gather many Q&A communities across 50 online plateform, including the well known Stack Overflow and other technical sites. 100 millon developpers consult Stack Exchange every month. The dataset is a parallel corpus with each question mapped to the top rated answer. The dataset is split given communities which cover a variety of domains from 3d printing, economics, raspberry pi or emacs. An exhaustive list of all communities is available here.

Languages

Stack Exchange mainly consist of english language (en).

Dataset Structure

Data Instances

Each data samples is presented as follow:

{'title_body': "Is there a Stack Exchange icon available? StackAuth /sites route provides all the site's icons except for the one of the Stack Exchange master site.\nCould you please provide it in some way (a static SVG would be good)?",
 'upvoted_answer': 'Here it is!\n\nDead link: SVG version here\nNote: the same restrictions on this trademarked icon that apply here, also apply to the icon above.',
 'downvoted_answer': 'No, the /sites route is not the right place for that.\n\n/sites enumerates all websites that expose API end-points. StackExchange.com does not expose such an endpoint, so it does not (and will not) appear in the results.'}

This particular exampe corresponds to the following page

Data Fields

The fields present in the dataset contain the following informations:

  • —title_body: This is the concatenation of the title and body from the question
  • —upvoted_answer: This is the body from the most upvoted answer

Data Splits

We provide multiple splits for this dataset, which each refers to a given community channel. We detail the number of pail for each split below:

Number of pairs
gaming82,887
dba71,449
codereview41,748
gis100,254
english100,640
mathoverflow85,289
askubuntu267,135
electronics129,494
apple92,487
diy52,896
magento79,241
gamedev40,154
mathematica59,895
ell77,892
judaism26,085
drupal67,817
blender54,153
biology19,277
android38,077
crypto19,404
christianity11,498
cs30,010
academia32,137
chemistry27,061
aviation18,755
history10,766
japanese20,948
cooking22,641
law16,133
hermeneutics9,516
hinduism8,999
graphicdesign28,083
dsp17,430
bicycles15,708
ethereum26,124
ja17,376
arduino16,281
bitcoin22,474
islam10,052
datascience20,503
german13,733
codegolf8,211
boardgames11,805
economics8,844
emacs16,830
buddhism6,787
gardening13,246
astronomy9,086
anime10,131
fitness8,297
cstheory7,742
engineering8,649
chinese8,646
linguistics6,843
cogsci5,101
french10,578
literature3,539
ai5,763
craftcms11,236
health4,494
chess6,392
interpersonal3,398
expressionengine10,742
earthscience4,396
civicrm10,648
joomla5,887
homebrew5,608
latin3,969
ham3,501
hsm2,517
avp6,450
expatriates4,913
matheducators2,706
genealogy2,895
3dprinting3,488
devops3,462
bioinformatics3,135
computergraphics2,306
elementaryos5,917
martialarts1,737
hardwarerecs2,050
lifehacks2,576
crafts1,659
italian3,101
freelancing1,663
materials1,101
bricks3,530
cseducators902
eosio1,940
iot1,359
languagelearning948
beer1,012
ebooks1,107
coffee1,188
esperanto1,466
korean1,406
cardano248
conlang334
drones496
iota775
salesforce87,272
wordpress83,621
rpg40,435
scifi54,805
stats115,679
serverfault238,507
physics141,230
sharepoint80,420
security51,355
worldbuilding26,210
softwareengineering51,326
superuser352,610
meta1,000
money29,404
travel36,533
photo23,204
webmasters30,370
workplace24,012
ux28,901
philosophy13,114
music19,936
politics11,047
movies18,243
space12,893
skeptics8,145
raspberrypi24,143
rus16,528
puzzling17,448
webapps24,867
mechanics18,613
writers9,867
networkengineering12,590
parenting5,998
softwarerecs11,761
quant12,933
spanish7,675
scicomp7,036
pets6,156
sqa9,256
sitecore7,838
vi9,000
outdoors5,278
sound8,303
pm5,435
reverseengineering5,817
retrocomputing3,907
tridion5,907
quantumcomputing4,320
sports4,707
robotics4,648
russian3,937
opensource3,221
woodworking2,955
ukrainian1,767
opendata3,842
patents3,573
mythology1,595
portuguese1,964
tor4,167
monero3,508
sustainability1,674
musicfans2,431
poker1,665
or1,490
windowsphone2,807
stackapps1,518
moderators504
vegetarianism585
tezos1,169
stellar1,078
pt103,277
unix155,414
tex171,628
ru253,289
total4,750,619

Dataset Creation

Curation Rationale

We primary designed this dataset for sentence embeddings training. Indeed sentence embeddings may be trained using a contrastive learning setup for which the model is trained to associate each sentence with its corresponding pair out of multiple proposition. Such models require many examples to be efficient and thus the dataset creation may be tedious. Community networks such as Stack Exchange allow us to build many examples semi-automatically.

Source Data

The source data are dumps from Stack Exchange

Initial Data Collection and Normalization

We collected the data from the math community.

We filtered out questions which title or body length is bellow 20 characters and questions for which body length is above 4096 characters.

Who are the source language producers?

Questions and answers are written by the community developpers of Stack Exchange.

Additional Information

Licensing Information

Please see the license information at: https://archive.org/details/stackexchange

Citation Information

@misc{StackExchangeDataset,
  author = {Flax Sentence Embeddings Team},
  title = {Stack Exchange question pairs},
  year = {2021},
  howpublished = {https://huggingface.co/datasets/flax-sentence-embeddings/},
}

Contributions

Thanks to the Flax Sentence Embeddings team for adding this dataset.