Datasets:

Modalities:
Text
Sub-tasks:
fact-checking
Languages:
English
ArXiv:
Libraries:
Datasets
License:
mkon commited on
Commit
676847f
1 Parent(s): 6278ea5

passes tests

Browse files
Files changed (3) hide show
  1. dataset_infos.json +1 -0
  2. rumoureval2019_train.csv +35 -34
  3. rumoureval_2019.py +13 -41
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"train": {"description": "This new dataset is designed to solve this great NLP task and is crafted with a lot of care.\n", "citation": "@InProceedings{huggingface:dataset,\ntitle = {A great new dataset},\nauthor={huggingface, Inc.\n},\nyear={2020}\n}\n", "homepage": "", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "source_text": {"dtype": "string", "id": null, "_type": "Value"}, "reply_text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 4, "names": ["support", "query", "deny", "comment"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "rumour_eval2019", "config_name": "train", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1242200, "num_examples": 4879, "dataset_name": "rumour_eval2019"}}, "download_checksums": {"rumoureval2019_train.csv": {"num_bytes": 1203917, "checksum": "134c036e34da708f0edb22b3cc688054d6395d1669eef78e4afa0fd9a4ed4c43"}}, "download_size": 1203917, "post_processing_size": null, "dataset_size": 1242200, "size_in_bytes": 2446117}}
rumoureval2019_train.csv CHANGED
@@ -1,4 +1,4 @@
1
- ,Source Tweet,Reply,Label
2
  0,"France: 10 people dead after shooting at HQ of satirical weekly newspaper #CharlieHebdo, according to witnesses http://t.co/FkYxGmuS58",MT @euronews France: 10 dead after shooting at HQ of satirical weekly #CharlieHebdo. If Zionists/Jews did this they'd be nuking Israel,comment
3
  1,"France: 10 people dead after shooting at HQ of satirical weekly newspaper #CharlieHebdo, according to witnesses http://t.co/FkYxGmuS58","@nanoSpawn Socialists, Antisemites, anti zionists - usual suspects",comment
4
  2,"France: 10 people dead after shooting at HQ of satirical weekly newspaper #CharlieHebdo, according to witnesses http://t.co/FkYxGmuS58","@euronews LOL. 5 million Muslims in France, what a disgrace. the french worm president and politicians killed them. tine for croissants now",comment
@@ -733,7 +733,8 @@ http://t.co/yzHJi4Hw54","@TIME
733
  IN UKRAINE HAVE GIVEN THE NAZI COUP, SUPPORTED BY NATO AND MEDIA COMMUNICATION,AS SEE PHOTO..
734
  http://t.co/tYCudKSLwr",comment
735
  544,"Paris Murder Suspects Cornered with Hostage
736
- http://t.co/yzHJi4Hw54",@TIME literally...when these terrorists attacks going to finish....
 
737
  545,"Paris Murder Suspects Cornered with Hostage
738
  http://t.co/yzHJi4Hw54","@TIME NM - Sends electric waves to girls and threaten them, sends drug in my body and clumps my chest though radioactivity",comment
739
  546,"Paris Murder Suspects Cornered with Hostage
@@ -5698,14 +5699,14 @@ From YOUR link. [when you read past the hyperbolic headline, down at the bottom,
5698
 
5699
 
5700
  ",comment
5701
- 4366,Jon Sopel: Bizarre. @realDonaldTrump says he came to Turnberry the day before Brexit and he told everyone that he thought Brexit would happen. And that he predicted correctly what would happen the next day. Umm. Not true. He came the day after Brexit. I was there. June 24,"
5702
  [Jon Sopel](https://twitter.com/BBCJonSopel) ^verified | Reach: 83,111 | Location: UK
5703
 
5704
- Bio: Jon Sopel, BBC North America Editor. My book If Only They Didn't Speak English is out now.
5705
-
5706
-
5707
- *****
5708
- ^I ^am ^a ^bot. ^Any ^complaints ^& ^suggestions ^to ^/r/ContextualBot ^thanks
5709
  ",comment
5710
  4367,Jon Sopel: Bizarre. @realDonaldTrump says he came to Turnberry the day before Brexit and he told everyone that he thought Brexit would happen. And that he predicted correctly what would happen the next day. Umm. Not true. He came the day after Brexit. I was there. June 24,"He did predict that Leave would win though:
5711
  http://uk.businessinsider.com/trump-predicts-a-brexit-2016-3",comment
@@ -6083,14 +6084,14 @@ Communist Manifesto was 19th century
6083
  ""Re Sun story. As I told the journalist this is nonsense. I've no recollection of this happening & its not the sort of thing I would forget""
6084
 
6085
  Who do I believe, The Sun or Nick Clegg?",comment
6086
- 4493,'Queen backs Brexit' - The Sun front page tomorrow,"[**@nick\_clegg**](https://twitter.com/nick_clegg/)
6087
-
6088
- > [2016-03-08 22:49 UTC](https://twitter.com/nick_clegg/status/707337515670249472)
6089
-
6090
- > Re Sun story. As I told the journalist this is nonsense. I've no recollection of this happening & its not the sort of thing I would forget
6091
-
6092
- ----
6093
-
6094
  ^This ^message ^was ^created ^by ^a ^bot
6095
 
6096
  [^[Contact ^creator]](http://np.reddit.com/message/compose/?to=jasie3k&subject=TweetsInCommentsBot)[^[Source ^code]](https://github.com/janpetryk/reddit-bot)
@@ -6194,14 +6195,14 @@ But that's all speculation...",comment
6194
  ""Soon as politicians say ""I have no recollection of this happening"" instead of ""It never happened"" you know it did ""
6195
 
6196
  https://twitter.com/Rifty01/status/707370900455333888",comment
6197
- 4530,'Queen backs Brexit' - The Sun front page tomorrow,"[**@Rifty01**](https://twitter.com/Rifty01/)
6198
-
6199
- > [2016-03-09 01:02 UTC](https://twitter.com/Rifty01/status/707370900455333888)
6200
-
6201
- > Soon as politicians say ""I have no recollection of this happening"" instead of ""It never happened"" you know it did @nick\_clegg @Holbornlolz
6202
-
6203
- ----
6204
-
6205
  ^This ^message ^was ^created ^by ^a ^bot
6206
 
6207
  [^[Contact ^creator]](http://np.reddit.com/message/compose/?to=jasie3k&subject=TweetsInCommentsBot)[^[Source ^code]](https://github.com/janpetryk/reddit-bot)
@@ -6257,14 +6258,14 @@ Which of course we can trust because it's not like they're heavily biased to cam
6257
  ""This might be true""
6258
 
6259
  https://twitter.com/andrewmarr9/status/707448781479002112",comment
6260
- 4548,'Queen backs Brexit' - The Sun front page tomorrow,"[**@AndrewMarr9**](https://twitter.com/AndrewMarr9/)
6261
-
6262
- > [2016-03-09 06:11 UTC](https://twitter.com/AndrewMarr9/status/707448781479002112)
6263
-
6264
- > This might be true. https://twitter.com/mrharrycole/status/707337119077933057
6265
-
6266
- ----
6267
-
6268
  ^This ^message ^was ^created ^by ^a ^bot
6269
 
6270
  [^[Contact ^creator]](http://np.reddit.com/message/compose/?to=jasie3k&subject=TweetsInCommentsBot)[^[Source ^code]](https://github.com/janpetryk/reddit-bot)
@@ -6941,8 +6942,8 @@ I just found this subreddit today and I think I should maybe stay away from it.
6941
  4855,Is it true there has never been a war between two democracies? Yes! Israel's no longer democracy.,"False. The first step in one democracy declaring war on another is to carefully define democracy in such a way that it excludes your opponent.
6942
 
6943
  In this instance, you have chosen to define Israel as not a democracy.",deny
6944
- 4856,Is it true there has never been a war between two democracies? Yes! Israel's no longer democracy.,"This is disgraceful.
6945
-
6946
  Israel has the chance to be a beacon of democracy in the middle east and/or a stable homeland for the Jewish people, but actions like this don't help either endeavor.",comment
6947
  4857,Is it true there has never been a war between two democracies? Yes! Israel's no longer democracy.,"Israel never really was a democracy.
6948
 
 
1
+ id,source_text,reply_text,label
2
  0,"France: 10 people dead after shooting at HQ of satirical weekly newspaper #CharlieHebdo, according to witnesses http://t.co/FkYxGmuS58",MT @euronews France: 10 dead after shooting at HQ of satirical weekly #CharlieHebdo. If Zionists/Jews did this they'd be nuking Israel,comment
3
  1,"France: 10 people dead after shooting at HQ of satirical weekly newspaper #CharlieHebdo, according to witnesses http://t.co/FkYxGmuS58","@nanoSpawn Socialists, Antisemites, anti zionists - usual suspects",comment
4
  2,"France: 10 people dead after shooting at HQ of satirical weekly newspaper #CharlieHebdo, according to witnesses http://t.co/FkYxGmuS58","@euronews LOL. 5 million Muslims in France, what a disgrace. the french worm president and politicians killed them. tine for croissants now",comment
 
733
  IN UKRAINE HAVE GIVEN THE NAZI COUP, SUPPORTED BY NATO AND MEDIA COMMUNICATION,AS SEE PHOTO..
734
  http://t.co/tYCudKSLwr",comment
735
  544,"Paris Murder Suspects Cornered with Hostage
736
+ http://t.co/yzHJi4Hw54",@TIME literally...when these terrorists attacks going to finish....
737
+ Praying for the victims..,comment
738
  545,"Paris Murder Suspects Cornered with Hostage
739
  http://t.co/yzHJi4Hw54","@TIME NM - Sends electric waves to girls and threaten them, sends drug in my body and clumps my chest though radioactivity",comment
740
  546,"Paris Murder Suspects Cornered with Hostage
 
5699
 
5700
 
5701
  ",comment
5702
+ 4366,Jon Sopel: Bizarre. @realDonaldTrump says he came to Turnberry the day before Brexit and he told everyone that he thought Brexit would happen. And that he predicted correctly what would happen the next day. Umm. Not true. He came the day after Brexit. I was there. June 24,"
5703
  [Jon Sopel](https://twitter.com/BBCJonSopel) ^verified | Reach: 83,111 | Location: UK
5704
 
5705
+ Bio: Jon Sopel, BBC North America Editor. My book If Only They Didn't Speak English is out now.
5706
+
5707
+
5708
+ *****
5709
+ ^I ^am ^a ^bot. ^Any ^complaints ^& ^suggestions ^to ^/r/ContextualBot ^thanks
5710
  ",comment
5711
  4367,Jon Sopel: Bizarre. @realDonaldTrump says he came to Turnberry the day before Brexit and he told everyone that he thought Brexit would happen. And that he predicted correctly what would happen the next day. Umm. Not true. He came the day after Brexit. I was there. June 24,"He did predict that Leave would win though:
5712
  http://uk.businessinsider.com/trump-predicts-a-brexit-2016-3",comment
 
6084
  ""Re Sun story. As I told the journalist this is nonsense. I've no recollection of this happening & its not the sort of thing I would forget""
6085
 
6086
  Who do I believe, The Sun or Nick Clegg?",comment
6087
+ 4493,'Queen backs Brexit' - The Sun front page tomorrow,"[**@nick\_clegg**](https://twitter.com/nick_clegg/)
6088
+
6089
+ > [2016-03-08 22:49 UTC](https://twitter.com/nick_clegg/status/707337515670249472)
6090
+
6091
+ > Re Sun story. As I told the journalist this is nonsense. I've no recollection of this happening & its not the sort of thing I would forget
6092
+
6093
+ ----
6094
+
6095
  ^This ^message ^was ^created ^by ^a ^bot
6096
 
6097
  [^[Contact ^creator]](http://np.reddit.com/message/compose/?to=jasie3k&subject=TweetsInCommentsBot)[^[Source ^code]](https://github.com/janpetryk/reddit-bot)
 
6195
  ""Soon as politicians say ""I have no recollection of this happening"" instead of ""It never happened"" you know it did ""
6196
 
6197
  https://twitter.com/Rifty01/status/707370900455333888",comment
6198
+ 4530,'Queen backs Brexit' - The Sun front page tomorrow,"[**@Rifty01**](https://twitter.com/Rifty01/)
6199
+
6200
+ > [2016-03-09 01:02 UTC](https://twitter.com/Rifty01/status/707370900455333888)
6201
+
6202
+ > Soon as politicians say ""I have no recollection of this happening"" instead of ""It never happened"" you know it did @nick\_clegg @Holbornlolz
6203
+
6204
+ ----
6205
+
6206
  ^This ^message ^was ^created ^by ^a ^bot
6207
 
6208
  [^[Contact ^creator]](http://np.reddit.com/message/compose/?to=jasie3k&subject=TweetsInCommentsBot)[^[Source ^code]](https://github.com/janpetryk/reddit-bot)
 
6258
  ""This might be true""
6259
 
6260
  https://twitter.com/andrewmarr9/status/707448781479002112",comment
6261
+ 4548,'Queen backs Brexit' - The Sun front page tomorrow,"[**@AndrewMarr9**](https://twitter.com/AndrewMarr9/)
6262
+
6263
+ > [2016-03-09 06:11 UTC](https://twitter.com/AndrewMarr9/status/707448781479002112)
6264
+
6265
+ > This might be true. https://twitter.com/mrharrycole/status/707337119077933057
6266
+
6267
+ ----
6268
+
6269
  ^This ^message ^was ^created ^by ^a ^bot
6270
 
6271
  [^[Contact ^creator]](http://np.reddit.com/message/compose/?to=jasie3k&subject=TweetsInCommentsBot)[^[Source ^code]](https://github.com/janpetryk/reddit-bot)
 
6942
  4855,Is it true there has never been a war between two democracies? Yes! Israel's no longer democracy.,"False. The first step in one democracy declaring war on another is to carefully define democracy in such a way that it excludes your opponent.
6943
 
6944
  In this instance, you have chosen to define Israel as not a democracy.",deny
6945
+ 4856,Is it true there has never been a war between two democracies? Yes! Israel's no longer democracy.,"This is disgraceful.
6946
+
6947
  Israel has the chance to be a beacon of democracy in the middle east and/or a stable homeland for the Jewish people, but actions like this don't help either endeavor.",comment
6948
  4857,Is it true there has never been a war between two democracies? Yes! Israel's no longer democracy.,"Israel never really was a democracy.
6949
 
rumoureval_2019.py CHANGED
@@ -122,51 +122,23 @@ class RumourEval2019(datasets.GeneratorBasedBuilder):
122
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
123
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
124
  urls = _URLS[self.config.name]
125
- data_dir = dl_manager.download_and_extract(urls)
126
  return [
127
- datasets.SplitGenerator(
128
- name=datasets.Split.TRAIN,
129
- # These kwargs will be passed to _generate_examples
130
- gen_kwargs={
131
- "filepath": os.path.join(data_dir, "train.jsonl"),
132
- "split": "train",
133
- },
134
- ),
135
- datasets.SplitGenerator(
136
- name=datasets.Split.TEST,
137
- # These kwargs will be passed to _generate_examples
138
- gen_kwargs={
139
- "filepath": os.path.join(data_dir, "test.jsonl"),
140
- "split": "test"
141
- },
142
- ),
143
- datasets.SplitGenerator(
144
- name=datasets.Split.VALIDATION,
145
- # These kwargs will be passed to _generate_examples
146
- gen_kwargs={
147
- "filepath": os.path.join(data_dir, "dev.jsonl"),
148
- "split": "dev",
149
- },
150
- ),
151
  ]
152
 
153
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
154
  def _generate_examples(self, filepath, split):
155
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
156
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
157
- with open(filepath, encoding="utf-8") as f:
158
- for key, row in enumerate(f):
159
- data = json.loads(row)
160
- if self.config.name == "first_domain":
161
- # Yields examples as (key, example) tuples
162
- yield key, {
163
- "sentence": data["sentence"],
164
- "option1": data["option1"],
165
- "answer": "" if split == "test" else data["answer"],
166
- }
167
- else:
168
- yield key, {
169
- "sentence": data["sentence"],
170
- "option2": data["option2"],
171
- "second_domain_answer": "" if split == "test" else data["second_domain_answer"],
172
- }
 
122
  # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
123
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
124
  urls = _URLS[self.config.name]
125
+ train_text = dl_manager.download_and_extract("rumoureval2019_train.csv")
126
  return [
127
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_text, "split": "train"})
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  ]
129
 
130
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
131
  def _generate_examples(self, filepath, split):
132
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
133
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
134
+ if split == "train":
135
+ with open(filepath, encoding="utf-8") as f:
136
+ reader = csv.DictReader(f, delimiter=",", quotechar='"')
137
+ guid = 0
138
+ for instance in reader:
139
+ instance["source_text"] = instance.pop("source_text")
140
+ instance["reply_text"] = instance.pop("reply_text")
141
+ instance["label"] = instance.pop("label")
142
+ instance['id'] = str(guid)
143
+ yield guid, instance
144
+ guid += 1