amylonidis commited on
Commit
740fe63
·
verified ·
1 Parent(s): b685081

Update clefip2011.py

Browse files
Files changed (1) hide show
  1. clefip2011.py +51 -62
clefip2011.py CHANGED
@@ -4,87 +4,76 @@ import datasets
4
 
5
 
6
  _CITATION = """\
7
- @InProceedings{suzgun2021:hupd,
8
- title = {The Harvard USPTO Patent Dataset},
9
- authors={Mirac Suzgun and Suproteem Sarkar and Luke Melas-Kyriazi and Scott Kominers and Stuart Shieber},
10
- year={2021}
 
 
11
  }
12
  """
13
 
14
-
15
- _DESCRIPTION = """
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 CLEFIP2011Config(datasets.BuilderConfig):
26
- """Custom Config for CLEFIP2011"""
27
-
28
- def __init__(
29
- self,
30
- dataset_type: str = None
31
- **kwargs
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
- BUILDER_CONFIG_CLASS = CLEFIP2011Config
43
 
44
- BUILDER_CONFIGS = [
45
- CLEFIP2011Config(
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
- if self.config.dataset_type == "bibliographic":
55
- features = datasets.Features(
56
- {
57
- "ucid": datasets.Value("string"),
58
- "country": datasets.Value("string"),
59
- "doc_number": datasets.Value("string"),
60
- "kind": datasets.Value("string"),
61
- "lang": datasets.Value("string"),
62
- "corrected_lang": datasets.Value("string"),
63
- "date": datasets.Value("string"),
64
- "family_id": datasets.Value("string"),
65
- "date_produced": datasets.Value("string"),
66
- "status": datasets.Value("string"),
67
- "ecla_list": datasets.Value("string"),
68
- "applicant_name_list": datasets.Value("string"),
69
- "inventor_name_list": datasets.Value("string"),
70
- "title_de_text": datasets.Value("string"),
71
- "title_fr_text": datasets.Value("string"),
72
- "title_en_text": datasets.Value("string"),
73
- "abstract_de_exist": datasets.Value("bool"),
74
- "abstract_fr_exist": datasets.Value("bool"),
75
- "abstract_en_exist": datasets.Value("bool"),
76
- "description_de_exist": datasets.Value("bool"),
77
- "description_fr_exist": datasets.Value("bool"),
78
- "description_en_exist": datasets.Value("bool"),
79
- "claims_de_exist": datasets.Value("bool"),
80
- "claims_fr_exist": datasets.Value("bool"),
81
- "claims_en_exist": datasets.Value("bool"),
82
- }
83
- )
84
  return datasets.DatasetInfo(
85
- description="CLEF-IP 2011 Bibliographic dataset.",
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):