Datasets:

ArXiv:
License:
NamCyan commited on
Commit
2aef2c4
1 Parent(s): 2d5f50b
Files changed (1) hide show
  1. the-vault-function.py +59 -6
the-vault-function.py CHANGED
@@ -96,19 +96,70 @@ class TheVaultFunction(datasets.GeneratorBasedBuilder):
96
  features=datasets.Features({
97
  "repo": datasets.Value("string"),
98
  "path": datasets.Value("string"),
99
- "license": datasets.Value("string"),
100
  "language": datasets.Value("string"),
101
  "identifier": datasets.Value("string"),
102
  "return_type": datasets.Value("string"),
103
  # "original_string": datasets.Value("string"),
104
  "original_docstring": datasets.Value("string"),
105
  "docstring": datasets.Value("string"),
 
106
  "code": datasets.Value("string"),
107
- "code_tokens": datasets.Value("string"),
108
- "docstring_tokens": datasets.Value("string"),
109
  "short_docstring": datasets.Value("string"),
110
- "short_docstring_tokens": datasets.Value("string"),
111
- "comment": datasets.Value("string"),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  }),
113
  supervised_keys=None,
114
  homepage=_HOMEPAGE,
@@ -192,6 +243,8 @@ class TheVaultFunction(datasets.GeneratorBasedBuilder):
192
  "code_tokens": row['code_tokens'][0],
193
  "short_docstring": row['short_docstring'][0],
194
  "short_docstring_tokens": row['short_docstring_tokens'][0],
195
- "comment": row['comment'][0]
 
 
196
  }
197
  key += 1
 
96
  features=datasets.Features({
97
  "repo": datasets.Value("string"),
98
  "path": datasets.Value("string"),
99
+ "license": datasets.Sequence(datasets.Value("string")),
100
  "language": datasets.Value("string"),
101
  "identifier": datasets.Value("string"),
102
  "return_type": datasets.Value("string"),
103
  # "original_string": datasets.Value("string"),
104
  "original_docstring": datasets.Value("string"),
105
  "docstring": datasets.Value("string"),
106
+ "docstring_tokens": datasets.Sequence(datasets.Value("string")),
107
  "code": datasets.Value("string"),
108
+ "code_tokens": datasets.Sequence(datasets.Value("string")),
 
109
  "short_docstring": datasets.Value("string"),
110
+ "short_docstring_tokens": datasets.Sequence(datasets.Value("string")),
111
+ "comment": datasets.Sequence(datasets.Value("string")),
112
+ "parameters": [
113
+ {
114
+ "param": datasets.Value("string"),
115
+ "type": datasets.Value("string"),
116
+ }
117
+ ],
118
+ "docstring_params": [
119
+ {
120
+ "returns": [
121
+ {
122
+ "docstring": datasets.Value("string"),
123
+ "docstring_tokens": datasets.Sequence(datasets.Value("string")),
124
+ "type": datasets.Value("string")
125
+ }
126
+ ],
127
+ "raises": [
128
+ {
129
+ "docstring": datasets.Value("string"),
130
+ "docstring_tokens": datasets.Sequence(datasets.Value("string")),
131
+ "type": datasets.Value("string")
132
+ }
133
+ ],
134
+ "params": [
135
+ {
136
+ "identifier": datasets.Value("string"),
137
+ "type": datasets.Value("string"),
138
+ "docstring": datasets.Value("string"),
139
+ "docstring_tokens": datasets.Sequence(datasets.Value("string")),
140
+ "default": datasets.Value("bool"),
141
+ "is_optional": datasets.Value("bool")
142
+ }
143
+ ],
144
+ "outlier_params": [
145
+ {
146
+ "identifier": datasets.Value("string"),
147
+ "type": datasets.Value("string"),
148
+ "docstring": datasets.Value("string"),
149
+ "docstring_tokens": datasets.Sequence(datasets.Value("string")),
150
+ "default": datasets.Value("bool"),
151
+ "is_optional": datasets.Value("bool")
152
+ }
153
+ ],
154
+ "others": [
155
+ {
156
+ "identifier": datasets.Value("string"),
157
+ "docstring": datasets.Value("string"),
158
+ "docstring_tokens": datasets.Sequence(datasets.Value("string"))
159
+ }
160
+ ]
161
+ }
162
+ ],
163
  }),
164
  supervised_keys=None,
165
  homepage=_HOMEPAGE,
 
243
  "code_tokens": row['code_tokens'][0],
244
  "short_docstring": row['short_docstring'][0],
245
  "short_docstring_tokens": row['short_docstring_tokens'][0],
246
+ "comment": row['comment'][0],
247
+ "parameters": row['parameters'][0],
248
+ "docstring_params": row['docstring_params'][0],
249
  }
250
  key += 1