aalkaswan commited on
Commit
3904996
·
1 Parent(s): 26b9141

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -1
README.md CHANGED
@@ -120,7 +120,64 @@ dataset_info:
120
  num_examples: 1765
121
  download_size: 3231436
122
  dataset_size: 8186989
 
 
 
 
123
  ---
124
  # Dataset Card for "nlbse_ccc"
125
 
126
- [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  num_examples: 1765
121
  download_size: 3231436
122
  dataset_size: 8186989
123
+ task_categories:
124
+ - text-classification
125
+ size_categories:
126
+ - 10K<n<100K
127
  ---
128
  # Dataset Card for "nlbse_ccc"
129
 
130
+ A dataset object for the NLBSE'23 Code Comment Classification competition. Please refer to the original [Github repo for more details](https://github.com/nlbse2023/code-comment-classification).
131
+
132
+ ## Category distribution in the training and test sets
133
+
134
+ The table below shows the distribution of positive/negative sentences for each category in the training and testing sets.
135
+
136
+ | Language | Category | Training | Training | Testing | Testing | Total |
137
+ |----------|--------------------|---------:|---------:|---------:|---------:|-------:|
138
+ | | | **Positive** | **Negative** | **Positive** | **Negative** | |
139
+ | Java | Expand | 505 | 1426 | 127 | 360 | 2418 |
140
+ | Java | Ownership | 90 | 1839 | 25 | 464 | 2418 |
141
+ | Java | Deprecation | 100 | 1831 | 27 | 460 | 2418 |
142
+ | Java | Rational | 223 | 1707 | 57 | 431 | 2418 |
143
+ | Java | Summary | 328 | 1600 | 87 | 403 | 2418 |
144
+ | Java | Pointer | 289 | 1640 | 75 | 414 | 2418 |
145
+ | Java | Usage | 728 | 1203 | 184 | 303 | 2418 |
146
+ | | | **Positive** | **Negative** | **Positive** | **Negative** | |
147
+ | Pharo | Responsibilities | 267 | 1139 | 69 | 290 | 1765 |
148
+ | Pharo | Keymessages | 242 | 1165 | 63 | 295 | 1765 |
149
+ | Pharo | Keyimplementationpoints | 184 | 1222 | 48 | 311 | 1765 |
150
+ | Pharo | Collaborators | 99 | 1307 | 28 | 331 | 1765 |
151
+ | Pharo | Example | 596 | 812 | 152 | 205 | 1765 |
152
+ | Pharo | Classreferences | 60 | 1348 | 17 | 340 | 1765 |
153
+ | Pharo | Intent | 173 | 1236 | 45 | 311 | 1765 |
154
+ | | | **Positive** | **Negative** | **Positive** | **Negative** | |
155
+ | Python | Expand | 402 | 1637 | 102 | 414 | 2555 |
156
+ | Python | Parameters | 633 | 1404 | 161 | 357 | 2555 |
157
+ | Python | Summary | 361 | 1678 | 93 | 423 | 2555 |
158
+ | Python | Developmentnotes | 247 | 1792 | 65 | 451 | 2555 |
159
+ | Python | Usage | 637 | 1401 | 163 | 354 | 2555 |
160
+
161
+ ## Code
162
+
163
+ The following code snippet was used to create the dataset:
164
+
165
+ ```
166
+ # !git clone https://github.com/nlbse2023/code-comment-classification.git
167
+ from datasets import DatasetDict
168
+
169
+ langs = ['java', 'python', 'pharo']
170
+ lan_cats = []
171
+ dataset_dict = DatasetDict()
172
+ for lan in langs: # for each language
173
+ df = pd.read_csv(f'./code-comment-classification/{lan}/input/{lan}.csv')
174
+ df['label'] = df.instance_type
175
+ df['combo'] = df[['comment_sentence', 'class']].agg(' | '.join, axis=1)
176
+ print(df.columns)
177
+ cats = list(map(lambda x: lan + '_' + x, list(set(df.category))))
178
+ lan_cats = lan_cats + cats
179
+ for cat in list(set(df.category)): # for each category
180
+ filtered = df[df.category == cat]
181
+ dataset_dict[f'{lan}_{cat}'] = Dataset.from_pandas(filtered)
182
+ dataset_dict.push_to_hub("AISE-TUDelft/nlbse_ccc", token='hf_********************')
183
+ ```