scirepeval / scirepeval_configs.py
Amanpreet Singh
new version
bd4180c
raw
history blame
26.7 kB
from typing import Dict, Any, List
import datasets
class ScirepevalConfig(datasets.BuilderConfig):
"""BuilderConfig for SuperGLUE."""
def __init__(self, features: Dict[str, Any], task_type: str, citation: str = "",
licenses: str = "", is_training: bool = False, homepage: str = "", url="", **kwargs):
"""BuilderConfig for SuperGLUE.
Args:
features: *list[string]*, list of the features that will appear in the
feature dict. Should not include "label".
data_url: *string*, url to download the zip file from.
citation: *string*, citation for the data set.
url: *string*, url for information about the data set.
label_classes: *list[string]*, the list of classes for the label if the
label is present as a string. Non-string labels will be cast to either
'False' or 'True'.
**kwargs: keyword arguments forwarded to super.
"""
super().__init__(version=datasets.Version("1.1.0"), **kwargs)
self.features = features
self.task_type = task_type
self.citation = citation
self.license = licenses
self.is_training = is_training
self.homepage = homepage
self.url = url
@classmethod
def get_features(self, feature_names: List[str], type_mapping: Dict[str, Any] = None) -> Dict[str, Any]:
features = {name: type_mapping[name] if name in type_mapping else datasets.Value("string") for name in
feature_names}
if "corpus_id" in features:
features["corpus_id"] = datasets.Value("uint64")
return features
SCIREPEVAL_CONFIGS = [
ScirepevalConfig(name="fos", features=ScirepevalConfig.get_features(
["doc_id", "corpus_id", "title", "abstract", "labels", "labels_text"],
{"labels": datasets.Sequence(datasets.Value("int32")),
"labels_text": datasets.Sequence(datasets.Value("string"))}),
task_type="classification (multi-label)", is_training=True, description=""),
ScirepevalConfig(name="mesh_descriptors", features=ScirepevalConfig.get_features(
["doc_id", "mag_id", "corpus_id", "title", "abstract", "descriptor", "qualifier"], {"mag_id": datasets.Value("uint64")}),
task_type="classification", is_training=True,
citation="@article{Lipscomb2000MedicalSH, \
title={Medical Subject Headings (MeSH).}, \
author={Carolyn E. Lipscomb}, \
journal={Bulletin of the Medical Library Association},\
year={2000}, \
volume={88 3}, \
pages={ \
265-6 \
} \
}",
description="", homepage="https://www.nlm.nih.gov/databases/download/mesh.html"
),
ScirepevalConfig(name="cite_count", features=ScirepevalConfig.get_features(
["doc_id", "corpus_id", "title", "abstract", "venue", "n_citations", "log_citations"],
{"n_citations": datasets.Value("int32"),
"log_citations": datasets.Value("float32")}),
task_type="regression", is_training=True, description=""
),
ScirepevalConfig(name="pub_year", features=ScirepevalConfig.get_features(
["doc_id", "corpus_id", "title", "abstract", "year", "venue", "norm_year", "scaled_year", "n_authors", "norm_authors"],
{"year": datasets.Value("int32"), "norm_year": datasets.Value("float32"),
"scaled_year": datasets.Value("float32"), "n_authors": datasets.Value("int32"),
"norm_authors": datasets.Value("float32"), }),
task_type="regression", is_training=True, description=""),
ScirepevalConfig(name="cite_prediction",
features=ScirepevalConfig.get_features(["query", "pos", "neg"],
{"query": {
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"sha": datasets.Value("string"),
"corpus_id": datasets.Value("uint64")},
"pos": {
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"sha": datasets.Value("string"),
"corpus_id": datasets.Value("uint64")}
, "neg": {
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"sha": datasets.Value("string"),
"corpus_id": datasets.Value("uint64")}}),
task_type="proximity", is_training=True, citation="@inproceedings{specter2020cohan, \
title={{SPECTER: Document-level Representation Learning using Citation-informed Transformers}}, \
author={Arman Cohan and Sergey Feldman and Iz Beltagy and Doug Downey and Daniel S. Weld}, \
booktitle={ACL}, \
year={2020} \
}", description="", homepage="https://github.com/allenai/specter"),
ScirepevalConfig(name="cite_prediction_new",
features=ScirepevalConfig.get_features(["query", "pos", "neg"],
{"query": {
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64")},
"pos": {
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64"),
}
, "neg": {
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64"),
"score": datasets.Value("int8")}}),
task_type="proximity", is_training=True, citation="@inproceedings{specter2020cohan, \
title={{SPECTER: Document-level Representation Learning using Citation-informed Transformers}}, \
author={Arman Cohan and Sergey Feldman and Iz Beltagy and Doug Downey and Daniel S. Weld}, \
booktitle={ACL}, \
year={2020} \
}", description="", homepage="https://github.com/allenai/specter"),
ScirepevalConfig(name="cite_prediction_aug2023refresh",
features=ScirepevalConfig.get_features(["query", "pos", "neg"],
{"query": {
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64")},
"pos": {
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64"),
}
, "neg": {
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64")}}),
task_type="proximity", is_training=True, citation="@inproceedings{specter2020cohan, \
title={{SPECTER: Document-level Representation Learning using Citation-informed Transformers}}, \
author={Arman Cohan and Sergey Feldman and Iz Beltagy and Doug Downey and Daniel S. Weld}, \
booktitle={ACL}, \
year={2020} \
}", description="", homepage="https://github.com/allenai/specter"),
ScirepevalConfig(name="high_influence_cite",
features=ScirepevalConfig.get_features(["query", "candidates"],
{"query": {
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64")},
"candidates":
[{"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64"),
"score": datasets.Value("uint32")}]}),
task_type="proximity", is_training=True, description=""),
ScirepevalConfig(name="same_author",
features=ScirepevalConfig.get_features(["dataset", "query", "candidates"],
{"query": {
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64")},
"candidates":
[{
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64"),
"score": datasets.Value("uint32")}]}),
task_type="proximity", is_training=True, description=""),
ScirepevalConfig(name="search",
features=ScirepevalConfig.get_features(["query", "doc_id", "candidates"],
{"candidates":
[{
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("uint64"),
"venue": datasets.Value("string"),
"year": datasets.Value("float64"),
"author_names": datasets.Sequence(datasets.Value("string")),
"n_citations": datasets.Value("int32"),
"n_key_citations": datasets.Value("int32"),
"score": datasets.Value("uint32")}]}),
task_type="search", is_training=True, description=""),
ScirepevalConfig(name="biomimicry", features=ScirepevalConfig.get_features(
["doc_id", "doi", "corpus_id", "title", "abstract", "label", "venue"], {"label": datasets.Value("uint32")}),
task_type="classification",
citation="@Article{vikram2019petal,\
AUTHOR = {Shyam, Vikram and Friend, Lauren and Whiteaker, Brian and Bense, Nicholas and Dowdall, Jonathan and Boktor, Bishoy and Johny, Manju and Reyes, Isaias and Naser, Angeera and Sakhamuri, Nikhitha and Kravets, Victoria and Calvin, Alexandra and Gabus, Kaylee and Goodman, Delonte and Schilling, Herbert and Robinson, Calvin and Reid II, Robert Omar and Unsworth, Colleen},\
TITLE = {PeTaL (Periodic Table of Life) and Physiomimetics},\
JOURNAL = {Designs},\
VOLUME = {3},\
YEAR = {2019},\
NUMBER = {3},\
ARTICLE-NUMBER = {43},\
URL = {https://www.mdpi.com/2411-9660/3/3/43},\
ISSN = {2411-9660},\
ABSTRACT = {The Periodic Table of Life (PeTaL) is a system design tool and open source framework that uses artificial intelligence (AI) to aid in the systematic inquiry of nature for its application to human systems. This paper defines PeTaL’s architecture and workflow. Biomimicry, biophysics, biomimetics, bionics and numerous other terms refer to the use of biology and biological principles to inform practices in other disciplines. For the most part, the domain of inquiry in these fields has been confined to extant biological models with the proponents of biomimicry often citing the evolutionary success of extant organisms relative to extinct ones. An objective of this paper is to expand the domain of inquiry for human processes that seek to model those that are, were or could be found in nature with examples that relate to the field of aerospace and to spur development of tools that can work together to accelerate the use of artificial intelligence, topology optimization and conventional modeling in problem solving. Specifically, specialized fields such as paleomimesis, anthropomimesis and physioteleology are proposed in conjunction with artificial evolution. The overarching philosophy outlined here can be thought of as physiomimetics, a holistic and systematic way of learning from natural history. The backbone of PeTaL integrates an unstructured database with an ontological model consisting of function, morphology, environment, state of matter and ecosystem. Tools that support PeTaL include machine learning, natural language processing and computer vision. Applications of PeTaL include guiding human space exploration, understanding human and geological history, and discovering new or extinct life. Also discussed is the formation of V.I.N.E. (Virtual Interchange for Nature-inspired Exploration), a virtual collaborative aimed at generating data, research and applications centered on nature. Details of implementation will be presented in subsequent publications. Recommendations for future work are also presented.},\
DOI = {10.3390/designs3030043}\
}",
description="",
homepage="https://github.com/nasa-petal/PeTaL-db"
),
ScirepevalConfig(name="drsm", features=ScirepevalConfig.get_features(
["doc_id", "corpus_id", "title", "abstract", "label_type", "label", "class"],
{"class": datasets.Value("uint32")}),
task_type="classification", description="",
homepage="https://github.com/chanzuckerberg/DRSM-corpus"
),
ScirepevalConfig(name="relish",
features=ScirepevalConfig.get_features(["query", "candidates"],
{"query": {
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("int64")},
"candidates":
[{
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("int64"),
"score": datasets.Value("uint32")}]}),
task_type="proximity", description=""),
ScirepevalConfig(name="nfcorpus",
features=ScirepevalConfig.get_features(["query", "doc_id", "candidates"],
{"candidates":
[{
"doc_id": datasets.Value("string"),
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"score": datasets.Value("uint32")}]}),
task_type="search", description=""),
ScirepevalConfig(name="peer_review_score_hIndex", features=ScirepevalConfig.get_features(
["doc_id", "corpus_id", "title", "abstract", "rating", "confidence", "authors", "decision", "mean_rating", "hIndex"],
{"mean_rating": datasets.Value("float32"),
"rating": datasets.Sequence(datasets.Value("int32")),
"authors": datasets.Sequence(datasets.Value("string")),
"hIndex": datasets.Sequence(datasets.Value("string"))
}),
task_type="regression", description=""
),
ScirepevalConfig(name="trec_covid",
features=ScirepevalConfig.get_features(["query", "doc_id", "candidates"],
{"candidates":
[{
"title": datasets.Value("string"),
"abstract": datasets.Value(
"string"),
"corpus_id": datasets.Value("string"),
"doc_id": datasets.Value("string"),
"date": datasets.Value("string"),
"doi": datasets.Value("string"),
"iteration": datasets.Value("string"),
"score": datasets.Value("int32")}]}),
task_type="search", description="", homepage="https://ir.nist.gov/trec-covid/", citation="@article{Voorhees2020TRECCOVIDCA,\
title={TREC-COVID: Constructing a Pandemic Information Retrieval Test Collection},\
author={Ellen M. Voorhees and Tasmeer Alam and Steven Bedrick and Dina Demner-Fushman and William R. Hersh and Kyle Lo and Kirk Roberts and Ian Soboroff and Lucy Lu Wang},\
journal={ArXiv},\
year={2020},\
volume={abs/2005.04474}\
}"),
ScirepevalConfig(name="tweet_mentions", features=ScirepevalConfig.get_features(
["doc_id", "corpus_id", "title", "abstract", "index", "retweets", "count", "mentions"],
{"index": datasets.Value("int32"), "count": datasets.Value("int32"),
"retweets": datasets.Value("float32"), "mentions": datasets.Value("float32")}),
task_type="regression", description="",
citation="@article{Jain2021TweetPapAD,\
title={TweetPap: A Dataset to Study the Social Media Discourse of Scientific Papers},\
author={Naman Jain and Mayank Kumar Singh},\
journal={2021 ACM/IEEE Joint Conference on Digital Libraries (JCDL)},\
year={2021},\
pages={328-329}\
}"),
ScirepevalConfig(name="scidocs_mag_mesh", features=ScirepevalConfig.get_features(
["doc_id", "corpus_id", "title", "abstract", "authors", "cited_by", "references", "year"],
{"year": datasets.Value("int32"),
"authors": datasets.Sequence(datasets.Value("string")),
"cited_by": datasets.Sequence(datasets.Value("string")),
"references": datasets.Sequence(datasets.Value("string"))
}),
task_type="classification ", description="", url="scidocs/mag_mesh",
homepage="https://github.com/allenai/scidocs", citation="@inproceedings{specter2020cohan,\
title={SPECTER: Document-level Representation Learning using Citation-informed Transformers},\
author={Arman Cohan and Sergey Feldman and Iz Beltagy and Doug Downey and Daniel S. Weld},\
booktitle={ACL},\
year={2020}\
}"),
ScirepevalConfig(name="scidocs_view_cite_read", features=ScirepevalConfig.get_features(
["doc_id", "corpus_id", "title", "abstract", "authors", "cited_by", "references", "year"],
{"year": datasets.Value("int32"),
"authors": datasets.Sequence(datasets.Value("string")),
"cited_by": datasets.Sequence(datasets.Value("string")),
"references": datasets.Sequence(datasets.Value("string"))
}),
task_type="metadata", description="", url="scidocs/view_cite_read",
homepage="https://github.com/allenai/scidocs", citation="@inproceedings{specter2020cohan,\
title={SPECTER: Document-level Representation Learning using Citation-informed Transformers},\
author={Arman Cohan and Sergey Feldman and Iz Beltagy and Doug Downey and Daniel S. Weld},\
booktitle={ACL},\
year={2020}\
}"),
ScirepevalConfig(name="paper_reviewer_matching", features=ScirepevalConfig.get_features(
["doc_id", "title", "abstract", "corpus_id"],
{}),
task_type="metadata", description="", citation="@inproceedings{Mimno2007ExpertiseMF,\
title={Expertise modeling for matching papers with reviewers},\
author={David Mimno and Andrew McCallum},\
booktitle={KDD '07},\
year={2007}\
}, @ARTICLE{9714338,\
author={Zhao, Yue and Anand, Ajay and Sharma, Gaurav},\
journal={IEEE Access}, \
title={Reviewer Recommendations Using Document Vector Embeddings and a Publisher Database: Implementation and Evaluation}, \
year={2022},\
volume={10},\
number={},\
pages={21798-21811},\
doi={10.1109/ACCESS.2022.3151640}}")
]