Datasets:
lmqg
/

Modalities:
Text
Languages:
English
ArXiv:
Libraries:
Datasets
License:
asahi417 commited on
Commit
2d3078e
1 Parent(s): 817fd99

Update qg_tweetqa.py

Browse files
Files changed (1) hide show
  1. qg_tweetqa.py +22 -13
qg_tweetqa.py CHANGED
@@ -2,13 +2,23 @@ import json
2
  import datasets
3
 
4
  logger = datasets.logging.get_logger(__name__)
5
- _VERSION = "2.0.1"
6
- _NAME = "qag_tweetqa"
7
  _CITATION = """
8
- TBA
 
 
 
 
 
 
 
 
 
 
9
  """
10
- _DESCRIPTION = """Question & answer generation dataset based on [TweetQA](https://huggingface.co/datasets/tweet_qa)."""
11
- _URL = "https://huggingface.co/datasets/lmqg/qag_tweetqa/resolve/main/data/processed"
12
  _URLS = {
13
  'train': f'{_URL}/train.jsonl',
14
  'test': f'{_URL}/test.jsonl',
@@ -16,7 +26,7 @@ _URLS = {
16
  }
17
 
18
 
19
- class QAGTweetQAConfig(datasets.BuilderConfig):
20
  """BuilderConfig"""
21
 
22
  def __init__(self, **kwargs):
@@ -24,13 +34,13 @@ class QAGTweetQAConfig(datasets.BuilderConfig):
24
  Args:
25
  **kwargs: keyword arguments forwarded to super.
26
  """
27
- super(QAGTweetQAConfig, self).__init__(**kwargs)
28
 
29
 
30
- class QAGTweetQA(datasets.GeneratorBasedBuilder):
31
 
32
  BUILDER_CONFIGS = [
33
- QAGTweetQAConfig(name=_NAME, version=datasets.Version(_VERSION), description=_DESCRIPTION),
34
  ]
35
 
36
  def _info(self):
@@ -38,11 +48,10 @@ class QAGTweetQA(datasets.GeneratorBasedBuilder):
38
  description=_DESCRIPTION,
39
  features=datasets.Features(
40
  {
41
- "answers": datasets.Sequence(datasets.Value("string")),
42
- "questions": datasets.Sequence(datasets.Value("string")),
 
43
  "paragraph": datasets.Value("string"),
44
- "paragraph_id": datasets.Value("string"),
45
- "questions_answers": datasets.Value("string")
46
  }
47
  ),
48
  supervised_keys=None,
 
2
  import datasets
3
 
4
  logger = datasets.logging.get_logger(__name__)
5
+ _VERSION = "3.0.0"
6
+ _NAME = "qg_tweetqa"
7
  _CITATION = """
8
+ @inproceedings{ushio-etal-2022-generative,
9
+ title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
10
+ author = "Ushio, Asahi and
11
+ Alva-Manchego, Fernando and
12
+ Camacho-Collados, Jose",
13
+ booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
14
+ month = dec,
15
+ year = "2022",
16
+ address = "Abu Dhabi, U.A.E.",
17
+ publisher = "Association for Computational Linguistics",
18
+ }
19
  """
20
+ _DESCRIPTION = """Question generation dataset based on [TweetQA](https://huggingface.co/datasets/tweet_qa)."""
21
+ _URL = "https://huggingface.co/datasets/lmqg/qg_tweetqa/resolve/main/data/processed"
22
  _URLS = {
23
  'train': f'{_URL}/train.jsonl',
24
  'test': f'{_URL}/test.jsonl',
 
26
  }
27
 
28
 
29
+ class QGTweetQAConfig(datasets.BuilderConfig):
30
  """BuilderConfig"""
31
 
32
  def __init__(self, **kwargs):
 
34
  Args:
35
  **kwargs: keyword arguments forwarded to super.
36
  """
37
+ super(QGTweetQAConfig, self).__init__(**kwargs)
38
 
39
 
40
+ class QGTweetQA(datasets.GeneratorBasedBuilder):
41
 
42
  BUILDER_CONFIGS = [
43
+ QGTweetQAConfig(name=_NAME, version=datasets.Version(_VERSION), description=_DESCRIPTION),
44
  ]
45
 
46
  def _info(self):
 
48
  description=_DESCRIPTION,
49
  features=datasets.Features(
50
  {
51
+ "answer": datasets.Value("string"),
52
+ "paragraph_question": datasets.Value("string"),
53
+ "question": datasets.Value("string"),
54
  "paragraph": datasets.Value("string"),
 
 
55
  }
56
  ),
57
  supervised_keys=None,