Dataset Summary
A dataset for benchmarking keyphrase extraction and generation techniques from english scientific papers. For more details about the dataset please refer the original paper - https://dl.acm.org/doi/abs/10.1145/313238.313437
Dataset Structure
Data Fields
- id: unique identifier of the document.
- document: Whitespace separated list of words in the document.
- 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.
- extractive_keyphrases: List of all the present keyphrases.
- abstractive_keyphrase: List of all the absent keyphrases.
Data Splits
Split | #datapoints |
---|---|
Train | 130 |
Test | 500 |
Usage
Full Dataset
from datasets import load_dataset
# get entire dataset
dataset = load_dataset("midas/cstr", "raw")
# sample from the train split
print("Sample from train dataset split")
test_sample = dataset["train"][0]
print("Fields in the sample: ", [key for key in test_sample.keys()])
print("Tokenized Document: ", test_sample["document"])
print("Document BIO Tags: ", test_sample["doc_bio_tags"])
print("Extractive/present Keyphrases: ", test_sample["extractive_keyphrases"])
print("Abstractive/absent Keyphrases: ", test_sample["abstractive_keyphrases"])
print("\n-----------\n")
# sample from the test split
print("Sample from test dataset split")
test_sample = dataset["test"][0]
print("Fields in the sample: ", [key for key in test_sample.keys()])
print("Tokenized Document: ", test_sample["document"])
print("Document BIO Tags: ", test_sample["doc_bio_tags"])
print("Extractive/present Keyphrases: ", test_sample["extractive_keyphrases"])
print("Abstractive/absent Keyphrases: ", test_sample["abstractive_keyphrases"])
print("\n-----------\n")
Output
Keyphrase Extraction
from datasets import load_dataset
# get the dataset only for keyphrase extraction
dataset = load_dataset("midas/cstr", "extraction")
print("Samples for Keyphrase Extraction")
# sample from the train split
print("Sample from train data split")
test_sample = dataset["train"][0]
print("Fields in the sample: ", [key for key in test_sample.keys()])
print("Tokenized Document: ", test_sample["document"])
print("Document BIO Tags: ", test_sample["doc_bio_tags"])
print("\n-----------\n")
# sample from the test split
print("Sample from test data split")
test_sample = dataset["test"][0]
print("Fields in the sample: ", [key for key in test_sample.keys()])
print("Tokenized Document: ", test_sample["document"])
print("Document BIO Tags: ", test_sample["doc_bio_tags"])
print("\n-----------\n")
Keyphrase Generation
# get the dataset only for keyphrase generation
dataset = load_dataset("midas/cstr", "generation")
print("Samples for Keyphrase Generation")
# sample from the train split
print("Sample from train data split")
test_sample = dataset["train"][0]
print("Fields in the sample: ", [key for key in test_sample.keys()])
print("Tokenized Document: ", test_sample["document"])
print("Extractive/present Keyphrases: ", test_sample["extractive_keyphrases"])
print("Abstractive/absent Keyphrases: ", test_sample["abstractive_keyphrases"])
print("\n-----------\n")
# sample from the test split
print("Sample from test data split")
test_sample = dataset["test"][0]
print("Fields in the sample: ", [key for key in test_sample.keys()])
print("Tokenized Document: ", test_sample["document"])
print("Extractive/present Keyphrases: ", test_sample["extractive_keyphrases"])
print("Abstractive/absent Keyphrases: ", test_sample["abstractive_keyphrases"])
print("\n-----------\n")
Citation Information
@inproceedings{10.1145/313238.313437,
author = {Witten, Ian H. and Paynter, Gordon W. and Frank, Eibe and Gutwin, Carl and Nevill-Manning, Craig G.},
title = {KEA: Practical Automatic Keyphrase Extraction},
year = {1999},
isbn = {1581131453},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/313238.313437},
doi = {10.1145/313238.313437},
booktitle = {Proceedings of the Fourth ACM Conference on Digital Libraries},
pages = {254–255},
numpages = {2},
location = {Berkeley, California, USA},
series = {DL '99}
}
Contributions
Thanks to @debanjanbhucs, @dibyaaaaax and @ad6398 for adding this dataset