Datasets:

Modalities:
Text
Size:
< 1K
Libraries:
Datasets
parquet-converter commited on
Commit
4440682
·
1 Parent(s): e5e10a8

Update parquet files

Browse files
.gitattributes DELETED
@@ -1,27 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bin.* filter=lfs diff=lfs merge=lfs -text
5
- *.bz2 filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.model filter=lfs diff=lfs merge=lfs -text
12
- *.msgpack filter=lfs diff=lfs merge=lfs -text
13
- *.onnx filter=lfs diff=lfs merge=lfs -text
14
- *.ot filter=lfs diff=lfs merge=lfs -text
15
- *.parquet filter=lfs diff=lfs merge=lfs -text
16
- *.pb filter=lfs diff=lfs merge=lfs -text
17
- *.pt filter=lfs diff=lfs merge=lfs -text
18
- *.pth filter=lfs diff=lfs merge=lfs -text
19
- *.rar filter=lfs diff=lfs merge=lfs -text
20
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
- *.tar.* filter=lfs diff=lfs merge=lfs -text
22
- *.tflite filter=lfs diff=lfs merge=lfs -text
23
- *.tgz filter=lfs diff=lfs merge=lfs -text
24
- *.xz filter=lfs diff=lfs merge=lfs -text
25
- *.zip filter=lfs diff=lfs merge=lfs -text
26
- *.zstandard filter=lfs diff=lfs merge=lfs -text
27
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,112 +0,0 @@
1
- ## Dataset Summary
2
-
3
- A dataset for benchmarking keyphrase extraction and generation techniques from english news articles. For more details about the dataset please refer the original paper - [https://dl.acm.org/doi/10.5555/1620163.1620205](https://dl.acm.org/doi/10.5555/1620163.1620205)
4
-
5
- Original source of the data - []()
6
-
7
-
8
- ## Dataset Structure
9
-
10
-
11
- ### Data Fields
12
-
13
- - **id**: unique identifier of the document.
14
- - **document**: Whitespace separated list of words in the document.
15
- - **doc_bio_tags**: BIO tags for each word in the document. B stands for the beginning of a keyphrase and I stands for inside the keyphrase. O stands for outside the keyphrase and represents the word that isn't a part of the keyphrase at all.
16
- - **extractive_keyphrases**: List of all the present keyphrases.
17
- - **abstractive_keyphrase**: List of all the absent keyphrases.
18
-
19
-
20
- ### Data Splits
21
-
22
- |Split| #datapoints |
23
- |--|--|
24
- | Test | 308 |
25
-
26
-
27
- ## Usage
28
-
29
- ### Full Dataset
30
-
31
- ```python
32
- from datasets import load_dataset
33
-
34
- # get entire dataset
35
- dataset = load_dataset("midas/duc2001", "raw")
36
-
37
- # sample from the test split
38
- print("Sample from test dataset split")
39
- test_sample = dataset["test"][0]
40
- print("Fields in the sample: ", [key for key in test_sample.keys()])
41
- print("Tokenized Document: ", test_sample["document"])
42
- print("Document BIO Tags: ", test_sample["doc_bio_tags"])
43
- print("Extractive/present Keyphrases: ", test_sample["extractive_keyphrases"])
44
- print("Abstractive/absent Keyphrases: ", test_sample["abstractive_keyphrases"])
45
- print("\n-----------\n")
46
- ```
47
- **Output**
48
-
49
- ```bash
50
- Sample from test data split
51
- Fields in the sample: ['id', 'document', 'doc_bio_tags', 'extractive_keyphrases', 'abstractive_keyphrases', 'other_metadata']
52
- Tokenized Document: ['Here', ',', 'at', 'a', 'glance', ',', 'are', 'developments', 'today', 'involving', 'the', 'crash', 'of', 'Pan', 'American', 'World', 'Airways', 'Flight', '103', 'Wednesday', 'night', 'in', 'Lockerbie', ',', 'Scotland', ',', 'that', 'killed', 'all', '259', 'people', 'aboard', 'and', 'more', 'than', '20', 'people', 'on', 'the', 'ground', ':']
53
- Document BIO Tags: ['O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'B', 'O', 'B', 'I', 'I', 'I', 'I', 'I', 'O', 'O', 'O', 'B', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O']
54
- Extractive/present Keyphrases: ['pan american world airways flight 103', 'crash', 'lockerbie']
55
- Abstractive/absent Keyphrases: ['terrorist threats', 'widespread wreckage', 'radical palestinian faction', 'terrorist bombing', 'bomb threat', 'sabotage']
56
-
57
- -----------
58
- ```
59
-
60
- ### Keyphrase Extraction
61
- ```python
62
- from datasets import load_dataset
63
-
64
- # get the dataset only for keyphrase extraction
65
- dataset = load_dataset("midas/duc2001", "extraction")
66
-
67
- print("Samples for Keyphrase Extraction")
68
-
69
- # sample from the test split
70
- print("Sample from test data split")
71
- test_sample = dataset["test"][0]
72
- print("Fields in the sample: ", [key for key in test_sample.keys()])
73
- print("Tokenized Document: ", test_sample["document"])
74
- print("Document BIO Tags: ", test_sample["doc_bio_tags"])
75
- print("\n-----------\n")
76
- ```
77
-
78
- ### Keyphrase Generation
79
- ```python
80
- # get the dataset only for keyphrase generation
81
- dataset = load_dataset("midas/duc2001", "generation")
82
-
83
- print("Samples for Keyphrase Generation")
84
-
85
- # sample from the test split
86
- print("Sample from test data split")
87
- test_sample = dataset["test"][0]
88
- print("Fields in the sample: ", [key for key in test_sample.keys()])
89
- print("Tokenized Document: ", test_sample["document"])
90
- print("Extractive/present Keyphrases: ", test_sample["extractive_keyphrases"])
91
- print("Abstractive/absent Keyphrases: ", test_sample["abstractive_keyphrases"])
92
- print("\n-----------\n")
93
- ```
94
-
95
- ## Citation Information
96
- ```
97
- @inproceedings{10.5555/1620163.1620205,
98
- author = {Wan, Xiaojun and Xiao, Jianguo},
99
- title = {Single Document Keyphrase Extraction Using Neighborhood Knowledge},
100
- year = {2008},
101
- isbn = {9781577353683},
102
- publisher = {AAAI Press},
103
- booktitle = {Proceedings of the 23rd National Conference on Artificial Intelligence - Volume 2},
104
- pages = {855–860},
105
- numpages = {6},
106
- location = {Chicago, Illinois},
107
- series = {AAAI'08}
108
- }
109
- ```
110
-
111
- ## Contributions
112
- Thanks to [@debanjanbhucs](https://github.com/debanjanbhucs), [@dibyaaaaax](https://github.com/dibyaaaaax) and [@ad6398](https://github.com/ad6398) for adding this dataset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
duc2001.py DELETED
@@ -1,142 +0,0 @@
1
- import json
2
- import datasets
3
-
4
- # _SPLIT = ['test']
5
- _CITATION = """\
6
- @inproceedings{10.5555/1620163.1620205,
7
- author = {Wan, Xiaojun and Xiao, Jianguo},
8
- title = {Single Document Keyphrase Extraction Using Neighborhood Knowledge},
9
- year = {2008},
10
- isbn = {9781577353683},
11
- publisher = {AAAI Press},
12
- booktitle = {Proceedings of the 23rd National Conference on Artificial Intelligence - Volume 2},
13
- pages = {855–860},
14
- numpages = {6},
15
- location = {Chicago, Illinois},
16
- series = {AAAI'08}
17
- }
18
- """
19
-
20
- _DESCRIPTION = """\
21
-
22
- """
23
-
24
- _HOMEPAGE = ""
25
-
26
- # TODO: Add the licence for the dataset here if you can find it
27
- _LICENSE = ""
28
-
29
- # TODO: Add link to the official dataset URLs here
30
-
31
- _URLS = {
32
- "test": "test.jsonl"
33
- }
34
-
35
-
36
- # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
37
- class DUC2001(datasets.GeneratorBasedBuilder):
38
- """TODO: Short description of my dataset."""
39
-
40
- VERSION = datasets.Version("0.0.1")
41
-
42
- BUILDER_CONFIGS = [
43
- datasets.BuilderConfig(name="extraction", version=VERSION,
44
- description="This part of my dataset covers extraction"),
45
- datasets.BuilderConfig(name="generation", version=VERSION,
46
- description="This part of my dataset covers generation"),
47
- datasets.BuilderConfig(name="raw", version=VERSION, description="This part of my dataset covers the raw data"),
48
- ]
49
-
50
- DEFAULT_CONFIG_NAME = "extraction"
51
-
52
- def _info(self):
53
- if self.config.name == "extraction": # This is the name of the configuration selected in BUILDER_CONFIGS above
54
- features = datasets.Features(
55
- {
56
- "id": datasets.Value("string"),
57
- "document": datasets.features.Sequence(datasets.Value("string")),
58
- "doc_bio_tags": datasets.features.Sequence(datasets.Value("string"))
59
-
60
- }
61
- )
62
- elif self.config.name == "generation":
63
- features = datasets.Features(
64
- {
65
- "id": datasets.Value("string"),
66
- "document": datasets.features.Sequence(datasets.Value("string")),
67
- "extractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
68
- "abstractive_keyphrases": datasets.features.Sequence(datasets.Value("string"))
69
-
70
- }
71
- )
72
- else:
73
- features = datasets.Features(
74
- {
75
- "id": datasets.Value("string"),
76
- "document": datasets.features.Sequence(datasets.Value("string")),
77
- "doc_bio_tags": datasets.features.Sequence(datasets.Value("string")),
78
- "extractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
79
- "abstractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
80
- "other_metadata": datasets.features.Sequence(
81
- {
82
- "text": datasets.features.Sequence(datasets.Value("string")),
83
- "bio_tags": datasets.features.Sequence(datasets.Value("string"))
84
- }
85
- )
86
-
87
- }
88
- )
89
- return datasets.DatasetInfo(
90
- # This is the description that will appear on the datasets page.
91
- description=_DESCRIPTION,
92
- # This defines the different columns of the dataset and their types
93
- features=features,
94
- homepage=_HOMEPAGE,
95
- # License for the dataset if available
96
- license=_LICENSE,
97
- # Citation for the dataset
98
- citation=_CITATION,
99
- )
100
-
101
- def _split_generators(self, dl_manager):
102
-
103
- data_dir = dl_manager.download_and_extract(_URLS)
104
- return [
105
- datasets.SplitGenerator(
106
- name=datasets.Split.TEST,
107
- # These kwargs will be passed to _generate_examples
108
- gen_kwargs={
109
- "filepath": data_dir['test'],
110
- "split": "test"
111
- },
112
- ),
113
- ]
114
-
115
- # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
116
- def _generate_examples(self, filepath, split):
117
- with open(filepath, encoding="utf-8") as f:
118
- for key, row in enumerate(f):
119
- data = json.loads(row)
120
- if self.config.name == "extraction":
121
- # Yields examples as (key, example) tuples
122
- yield key, {
123
- "id": data['paper_id'],
124
- "document": data["document"],
125
- "doc_bio_tags": data.get("doc_bio_tags")
126
- }
127
- elif self.config.name == "generation":
128
- yield key, {
129
- "id": data['paper_id'],
130
- "document": data["document"],
131
- "extractive_keyphrases": data.get("extractive_keyphrases"),
132
- "abstractive_keyphrases": data.get("abstractive_keyphrases")
133
- }
134
- else:
135
- yield key, {
136
- "id": data['paper_id'],
137
- "document": data["document"],
138
- "doc_bio_tags": data.get("doc_bio_tags"),
139
- "extractive_keyphrases": data.get("extractive_keyphrases"),
140
- "abstractive_keyphrases": data.get("abstractive_keyphrases"),
141
- "other_metadata": data["other_metadata"]
142
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
extraction/duc2001-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f22b38bd8a5fcece07eb61b58637ea2e35a0408ebde715269a1bf82ccb446b01
3
+ size 683547
generation/duc2001-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:450dd96846a6805986de2df214a99ab79766f36ca7b30a83350ea81459cb5a05
3
+ size 698318
raw/duc2001-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45c71cea2aa62263b68fd5d387ad966760c85a41ce3895a12de174671cbdb195
3
+ size 713811
test.jsonl DELETED
The diff for this file is too large to render. See raw diff