Datasets:
adding prmu categories
Browse files- README.md +7 -1
- dev.jsonl +0 -0
- inspec.py +10 -25
- test.jsonl +0 -0
- train.jsonl +0 -0
README.md
CHANGED
@@ -10,6 +10,11 @@ Details about the inspec dataset can be found in the original paper:
|
|
10 |
[Improved automatic keyword extraction given more linguistic knowledge](https://aclanthology.org/W03-1028).
|
11 |
In Proceedings of the 2003 Conference on Empirical Methods in Natural Language Processing, pages 216-223.
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
## Content
|
14 |
|
15 |
The dataset is divided into the following three splits:
|
@@ -25,5 +30,6 @@ The following data fields are available :
|
|
25 |
- **id**: unique identifier of the document.
|
26 |
- **title**: title of the document.
|
27 |
- **abstract**: abstract of the document.
|
28 |
-
- **keyphrases**: list of reference keyphrases
|
|
|
29 |
|
|
|
10 |
[Improved automatic keyword extraction given more linguistic knowledge](https://aclanthology.org/W03-1028).
|
11 |
In Proceedings of the 2003 Conference on Empirical Methods in Natural Language Processing, pages 216-223.
|
12 |
|
13 |
+
Reference (indexer-assigned) keyphrases are also categorized under the PRMU (<u>P</u>resent-<u>R</u>eordered-<u>M</u>ixed-<u>U</u>nseen) scheme as proposed in the following paper:
|
14 |
+
- Florian Boudin and Ygor Gallina. 2021.
|
15 |
+
[Redefining Absent Keyphrases and their Effect on Retrieval Effectiveness](https://aclanthology.org/2021.naacl-main.330/).
|
16 |
+
In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4185–4193, Online. Association for Computational Linguistics.
|
17 |
+
|
18 |
## Content
|
19 |
|
20 |
The dataset is divided into the following three splits:
|
|
|
30 |
- **id**: unique identifier of the document.
|
31 |
- **title**: title of the document.
|
32 |
- **abstract**: abstract of the document.
|
33 |
+
- **keyphrases**: list of reference keyphrases.
|
34 |
+
- **prmu**: list of <u>P</u>resent-<u>R</u>eordered-<u>M</u>ixed-<u>U</u>nseen categories for reference keyphrases.
|
35 |
|
dev.jsonl
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
inspec.py
CHANGED
@@ -59,7 +59,6 @@ class Inspec(datasets.GeneratorBasedBuilder):
|
|
59 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
60 |
BUILDER_CONFIGS = [
|
61 |
datasets.BuilderConfig(name="raw", version=VERSION, description="This part of my dataset covers the raw data."),
|
62 |
-
datasets.BuilderConfig(name="preprocessed", version=VERSION, description="This part of my dataset covers the preprocessed data."),
|
63 |
]
|
64 |
|
65 |
DEFAULT_CONFIG_NAME = "raw" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
@@ -73,15 +72,7 @@ class Inspec(datasets.GeneratorBasedBuilder):
|
|
73 |
"title": datasets.Value("string"),
|
74 |
"abstract": datasets.Value("string"),
|
75 |
"keyphrases": datasets.features.Sequence(datasets.Value("string")),
|
76 |
-
|
77 |
-
)
|
78 |
-
else:
|
79 |
-
features = datasets.Features(
|
80 |
-
{
|
81 |
-
"id": datasets.Value("int64"),
|
82 |
-
"title": datasets.Value("string"),
|
83 |
-
"abstract": datasets.Value("string"),
|
84 |
-
"keyphrases": datasets.features.Sequence(datasets.Value("string")),
|
85 |
}
|
86 |
)
|
87 |
return datasets.DatasetInfo(
|
@@ -143,18 +134,12 @@ class Inspec(datasets.GeneratorBasedBuilder):
|
|
143 |
with open(filepath, encoding="utf-8") as f:
|
144 |
for key, row in enumerate(f):
|
145 |
data = json.loads(row)
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
yield key, {
|
156 |
-
"id": data["id"],
|
157 |
-
"title": data["title"],
|
158 |
-
"abstract": data["abstract"],
|
159 |
-
"keyphrases": data["keyphrases"],
|
160 |
-
}
|
|
|
59 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
60 |
BUILDER_CONFIGS = [
|
61 |
datasets.BuilderConfig(name="raw", version=VERSION, description="This part of my dataset covers the raw data."),
|
|
|
62 |
]
|
63 |
|
64 |
DEFAULT_CONFIG_NAME = "raw" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
|
|
72 |
"title": datasets.Value("string"),
|
73 |
"abstract": datasets.Value("string"),
|
74 |
"keyphrases": datasets.features.Sequence(datasets.Value("string")),
|
75 |
+
"prmu": datasets.features.Sequence(datasets.Value("string")),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
)
|
78 |
return datasets.DatasetInfo(
|
|
|
134 |
with open(filepath, encoding="utf-8") as f:
|
135 |
for key, row in enumerate(f):
|
136 |
data = json.loads(row)
|
137 |
+
# Yields examples as (key, example) tuples
|
138 |
+
yield key, {
|
139 |
+
"id": data["id"],
|
140 |
+
"title": data["title"],
|
141 |
+
"abstract": data["abstract"],
|
142 |
+
"keyphrases": data["keyphrases"],
|
143 |
+
"prmu": data["prmu"],
|
144 |
+
}
|
145 |
+
|
|
|
|
|
|
|
|
|
|
|
|
test.jsonl
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
train.jsonl
CHANGED
The diff for this file is too large to render.
See raw diff
|
|