Add `versions` and `authors_parsed` to schema

#3
by cfrench - opened
Files changed (2) hide show
  1. README.md +24 -13
  2. arxiv_dataset.py +19 -1
README.md CHANGED
@@ -111,19 +111,29 @@ The language supported is English
111
 
112
  This dataset is a mirror of the original ArXiv data. Because the full dataset is rather large (1.1TB and growing), this dataset provides only a metadata file in the json format. An example is given below
113
 
114
- ```
115
- {'id': '0704.0002',
116
- 'submitter': 'Louis Theran',
117
- 'authors': 'Ileana Streinu and Louis Theran',
118
- 'title': 'Sparsity-certifying Graph Decompositions',
119
- 'comments': 'To appear in Graphs and Combinatorics',
120
- 'journal-ref': None,
121
- 'doi': None,
122
- 'report-no': None,
123
- 'categories': 'math.CO cs.CG',
124
- 'license': 'http://arxiv.org/licenses/nonexclusive-distrib/1.0/',
125
- 'abstract': ' We describe a new algorithm, the $(k,\\ell)$-pebble game with colors, and use\nit obtain a characterization of the family of $(k,\\ell)$-sparse graphs and\nalgorithmic solutions to a family of problems concerning tree decompositions of\ngraphs. Special instances of sparse graphs appear in rigidity theory and have\nreceived increased attention in recent years. In particular, our colored\npebbles generalize and strengthen the previous results of Lee and Streinu and\ngive a new proof of the Tutte-Nash-Williams characterization of arboricity. We\nalso present a new decomposition that certifies sparsity based on the\n$(k,\\ell)$-pebble game with colors. Our work also exposes connections between\npebble game algorithms and previous sparse graph algorithms by Gabow, Gabow and\nWestermann and Hendrickson.\n',
126
- 'update_date': '2008-12-13'}
 
 
 
 
 
 
 
 
 
 
127
  ```
128
 
129
  ### Data Fields
@@ -138,6 +148,7 @@ This dataset is a mirror of the original ArXiv data. Because the full dataset is
138
  - `report-no`: Report Number
139
  - `abstract`: The abstract of the paper
140
  - `categories`: Categories / tags in the ArXiv system
 
141
 
142
 
143
  ### Data Splits
 
111
 
112
  This dataset is a mirror of the original ArXiv data. Because the full dataset is rather large (1.1TB and growing), this dataset provides only a metadata file in the json format. An example is given below
113
 
114
+ ```json
115
+ {
116
+ "id": "0704.0002",
117
+ "submitter": "Louis Theran",
118
+ "authors": "Ileana Streinu and Louis Theran",
119
+ "title": "Sparsity-certifying Graph Decompositions",
120
+ "comments": "To appear in Graphs and Combinatorics",
121
+ "journal-ref": null,
122
+ "doi": null,
123
+ "report-no": null,
124
+ "categories": "math.CO cs.CG",
125
+ "license": "http://arxiv.org/licenses/nonexclusive-distrib/1.0/",
126
+ "abstract": " We describe a new algorithm, the $(k,\\ell)$-pebble game with colors, and use\nit obtain a characterization of the family of $(k,\\ell)$-sparse graphs and\nalgorithmic solutions to a family of problems concerning tree decompositions of\ngraphs. Special instances of sparse graphs appear in rigidity theory and have\nreceived increased attention in recent years. In particular, our colored\npebbles generalize and strengthen the previous results of Lee and Streinu and\ngive a new proof of the Tutte-Nash-Williams characterization of arboricity. We\nalso present a new decomposition that certifies sparsity based on the\n$(k,\\ell)$-pebble game with colors. Our work also exposes connections between\npebble game algorithms and previous sparse graph algorithms by Gabow, Gabow and\nWestermann and Hendrickson.\n",
127
+ "versions": [
128
+ { "version": "v1", "created": "Sat, 31 Mar 2007 02:26:18 GMT" },
129
+ { "version": "v2", "created": "Sat, 13 Dec 2008 17:26:00 GMT" }
130
+ ],
131
+ "update_date": "2008-12-13",
132
+ "authors_parsed": [
133
+ ["Streinu", "Ileana", ""],
134
+ ["Theran", "Louis", ""]
135
+ ]
136
+ }
137
  ```
138
 
139
  ### Data Fields
 
148
  - `report-no`: Report Number
149
  - `abstract`: The abstract of the paper
150
  - `categories`: Categories / tags in the ArXiv system
151
+ - `versions`: A version history
152
 
153
 
154
  ### Data Splits
arxiv_dataset.py CHANGED
@@ -51,7 +51,9 @@ _REPORT_NO = "report-no"
51
  _CATEGORIES = "categories"
52
  _LICENSE = "license"
53
  _ABSTRACT = "abstract"
 
54
  _UPDATE_DATE = "update_date"
 
55
 
56
  _FILENAME = "arxiv-metadata-oai-snapshot.json"
57
 
@@ -87,11 +89,25 @@ class ArxivDataset(datasets.GeneratorBasedBuilder):
87
  _CATEGORIES,
88
  _LICENSE,
89
  _ABSTRACT,
 
90
  _UPDATE_DATE,
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  ]
92
  return datasets.DatasetInfo(
93
  description=_DESCRIPTION,
94
- features=datasets.Features({k: datasets.Value("string") for k in feature_names}),
95
  supervised_keys=None,
96
  homepage=_HOMEPAGE,
97
  citation=_CITATION,
@@ -123,5 +139,7 @@ class ArxivDataset(datasets.GeneratorBasedBuilder):
123
  _CATEGORIES: data["categories"],
124
  _LICENSE: data["license"],
125
  _ABSTRACT: data["abstract"],
 
126
  _UPDATE_DATE: data["update_date"],
 
127
  }
 
51
  _CATEGORIES = "categories"
52
  _LICENSE = "license"
53
  _ABSTRACT = "abstract"
54
+ _VERSIONS = "versions"
55
  _UPDATE_DATE = "update_date"
56
+ _AUTHORS_PARSED = "authors_parsed"
57
 
58
  _FILENAME = "arxiv-metadata-oai-snapshot.json"
59
 
 
89
  _CATEGORIES,
90
  _LICENSE,
91
  _ABSTRACT,
92
+ _VERSIONS,
93
  _UPDATE_DATE,
94
+ _AUTHORS_PARSED,
95
+ ]
96
+ features = {k: datasets.Value("string") for k in feature_names}
97
+ features[_VERSIONS] = [
98
+ {
99
+ "version": datasets.Value("string"),
100
+ "created": datasets.Value("string"),
101
+ }
102
+ ]
103
+ features[_AUTHORS_PARSED] = [
104
+ [
105
+ datasets.Value("string"),
106
+ ]
107
  ]
108
  return datasets.DatasetInfo(
109
  description=_DESCRIPTION,
110
+ features=datasets.Features(features),
111
  supervised_keys=None,
112
  homepage=_HOMEPAGE,
113
  citation=_CITATION,
 
139
  _CATEGORIES: data["categories"],
140
  _LICENSE: data["license"],
141
  _ABSTRACT: data["abstract"],
142
+ _VERSIONS: data["versions"],
143
  _UPDATE_DATE: data["update_date"],
144
+ _AUTHORS_PARSED: data["authors_parsed"],
145
  }