Update clefip2011.py
Browse files- clefip2011.py +51 -62
clefip2011.py
CHANGED
|
@@ -4,87 +4,76 @@ import datasets
|
|
| 4 |
|
| 5 |
|
| 6 |
_CITATION = """\
|
| 7 |
-
@
|
| 8 |
-
title
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
}
|
| 12 |
"""
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
The Harvard USPTO Patent Dataset (HUPD) is a large-scale, well-structured, and multi-purpose corpus
|
| 17 |
-
of English-language patent applications filed to the United States Patent and Trademark Office (USPTO)
|
| 18 |
-
between 2004 and 2018. With more than 4.5 million patent documents, HUPD is two to three times larger
|
| 19 |
-
than comparable corpora. Unlike other NLP patent datasets, HUPD contains the inventor-submitted versions
|
| 20 |
-
of patent applications, not the final versions of granted patents, allowing us to study patentability at
|
| 21 |
-
the time of filing using NLP methods for the first time.
|
| 22 |
"""
|
| 23 |
|
| 24 |
|
| 25 |
-
class
|
| 26 |
-
"""
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
super().__init__(**kwargs)
|
| 34 |
-
self.dataset_type = dataset_type
|
| 35 |
|
| 36 |
|
| 37 |
class CLEFIP2011(datasets.GeneratorBasedBuilder):
|
| 38 |
"""Custom Dataset Loader"""
|
| 39 |
|
| 40 |
-
_DESCRIPTION
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
name="bibliographic",
|
| 47 |
-
version=datasets.Version("1.0.0"),
|
| 48 |
-
description="CLEF-IP 2011 Bibliographic Data",
|
| 49 |
-
dataset_type="bibliographic",
|
| 50 |
-
),
|
| 51 |
]
|
| 52 |
|
| 53 |
def _info(self):
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
)
|
| 84 |
return datasets.DatasetInfo(
|
| 85 |
-
description=
|
| 86 |
features=features,
|
| 87 |
supervised_keys=None,
|
|
|
|
|
|
|
| 88 |
)
|
| 89 |
|
| 90 |
def _split_generators(self, dl_manager):
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
_CITATION = """\
|
| 7 |
+
@article{,
|
| 8 |
+
title={RICE CROP DISEASES},
|
| 9 |
+
author={},
|
| 10 |
+
journal={},
|
| 11 |
+
year={},
|
| 12 |
+
volume={}
|
| 13 |
}
|
| 14 |
"""
|
| 15 |
|
| 16 |
+
_DESCRIPTION = """\
|
| 17 |
+
This is a sample dataset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
"""
|
| 19 |
|
| 20 |
|
| 21 |
+
class DatasetConfig(datasets.BuilderConfig):
|
| 22 |
+
"""BuilderConfig for RICE CROP DISEASES Dataset"""
|
| 23 |
+
def __init__(self, **kwargs):
|
| 24 |
+
"""BuilderConfig for RICE CROP DISEASES Dataset.
|
| 25 |
+
Args:
|
| 26 |
+
**kwargs: keyword arguments forwarded to super.
|
| 27 |
+
"""
|
| 28 |
+
super(DatasetConfig, self).__init__(**kwargs)
|
|
|
|
|
|
|
| 29 |
|
| 30 |
|
| 31 |
class CLEFIP2011(datasets.GeneratorBasedBuilder):
|
| 32 |
"""Custom Dataset Loader"""
|
| 33 |
|
|
|
|
| 34 |
|
| 35 |
+
BUILDER_CONFIG_CLASS = DatasetConfig
|
| 36 |
|
| 37 |
+
BUILDER_CONFIGS = [
|
| 38 |
+
DatasetConfig(name="bibliographic", version=datasets.Version("1.0.0"), description="Rice Crop Disease Detection dataset"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
]
|
| 40 |
|
| 41 |
def _info(self):
|
| 42 |
+
features = datasets.Features(
|
| 43 |
+
{
|
| 44 |
+
"ucid": datasets.Value("string"),
|
| 45 |
+
"country": datasets.Value("string"),
|
| 46 |
+
"doc_number": datasets.Value("string"),
|
| 47 |
+
"kind": datasets.Value("string"),
|
| 48 |
+
"lang": datasets.Value("string"),
|
| 49 |
+
"corrected_lang": datasets.Value("string"),
|
| 50 |
+
"date": datasets.Value("string"),
|
| 51 |
+
"family_id": datasets.Value("string"),
|
| 52 |
+
"date_produced": datasets.Value("string"),
|
| 53 |
+
"status": datasets.Value("string"),
|
| 54 |
+
"ecla_list": datasets.Value("string"),
|
| 55 |
+
"applicant_name_list": datasets.Value("string"),
|
| 56 |
+
"inventor_name_list": datasets.Value("string"),
|
| 57 |
+
"title_de_text": datasets.Value("string"),
|
| 58 |
+
"title_fr_text": datasets.Value("string"),
|
| 59 |
+
"title_en_text": datasets.Value("string"),
|
| 60 |
+
"abstract_de_exist": datasets.Value("bool"),
|
| 61 |
+
"abstract_fr_exist": datasets.Value("bool"),
|
| 62 |
+
"abstract_en_exist": datasets.Value("bool"),
|
| 63 |
+
"description_de_exist": datasets.Value("bool"),
|
| 64 |
+
"description_fr_exist": datasets.Value("bool"),
|
| 65 |
+
"description_en_exist": datasets.Value("bool"),
|
| 66 |
+
"claims_de_exist": datasets.Value("bool"),
|
| 67 |
+
"claims_fr_exist": datasets.Value("bool"),
|
| 68 |
+
"claims_en_exist": datasets.Value("bool"),
|
| 69 |
+
}
|
| 70 |
+
)
|
|
|
|
| 71 |
return datasets.DatasetInfo(
|
| 72 |
+
description=_DESCRIPTION,
|
| 73 |
features=features,
|
| 74 |
supervised_keys=None,
|
| 75 |
+
homepage="",
|
| 76 |
+
citation=_CITATION
|
| 77 |
)
|
| 78 |
|
| 79 |
def _split_generators(self, dl_manager):
|