aholovko commited on
Commit
7b951fd
·
verified ·
1 Parent(s): ad35bb1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +78 -33
README.md CHANGED
@@ -1,39 +1,84 @@
 
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  dataset_info:
3
  features:
4
- - name: code
5
- dtype: string
6
- - name: labels
7
- sequence:
8
- class_label:
9
- names:
10
- '0': assignOp
11
- '1': builtinShadow
12
- '2': captLocal
13
- '3': commentFormatting
14
- '4': elseif
15
- '5': ifElseChain
16
- '6': paramTypeCombine
17
- '7': singleCaseSwitch
 
 
 
 
18
  splits:
19
- - name: train
20
- num_bytes: 5232471
21
- num_examples: 1536
22
- - name: validation
23
- num_bytes: 805718
24
- num_examples: 222
25
- - name: test
26
- num_bytes: 1484505
27
- num_examples: 448
28
- download_size: 3163434
29
- dataset_size: 7522694
30
  configs:
31
- - config_name: default
32
- data_files:
33
- - split: train
34
- path: data/train-*
35
- - split: validation
36
- path: data/validation-*
37
- - split: test
38
- path: data/test-*
39
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
  ---
3
+ tags:
4
+ - code
5
+ - go
6
+ - code-style-analysis
7
+ - multi-label-classification
8
+ license: mit
9
+ language:
10
+ - go
11
+ source_datasets:
12
+ - bigcode/the-stack-v2
13
+ task_categories:
14
+ - text-classification
15
+ task_ids:
16
+ - multi-label-classification
17
  dataset_info:
18
  features:
19
+ - name: code
20
+ dtype: string
21
+ description: A snippet of Go source code.
22
+ - name: labels
23
+ dtype:
24
+ sequence:
25
+ class_label:
26
+ names:
27
+ - assignOp
28
+ - builtinShadow
29
+ - captLocal
30
+ - commentFormatting
31
+ - elseif
32
+ - ifElseChain
33
+ - paramTypeCombine
34
+ - singleCaseSwitch
35
+ description: >
36
+ One or more style-rule violations detected by the go‑critic linter's "style" checker group.
37
  splits:
38
+ - name: train
39
+ num_examples: 1536
40
+ - name: validation
41
+ num_examples: 222
42
+ - name: test
43
+ num_examples: 448
44
+ dataset_size: 2206
 
 
 
 
45
  configs:
46
+ - config_name: default
47
+ data_files:
48
+ - split: train
49
+ path: data/train-*
50
+ - split: validation
51
+ path: data/validation-*
52
+ - split: test
53
+ path: data/test-*
54
  ---
55
+ # go-critic-style
56
+
57
+ A **multi‑label** dataset of Go code snippets annotated with style violations from the [go‑critic linter's "style" group](https://go-critic.com/overview.html#checkers-from-the-style-group).
58
+ Curated from the [bigcode/the‑stack‑v2‑dedup](https://huggingface.co/datasets/bigcode/the-stack-v2-dedup) "Go" split, filtered to examples of manageable length.
59
+
60
+ ## Label Set
61
+
62
+ List of style violations covered by this dataset:
63
+
64
+ | ID | Label | Description |
65
+ |--:|----------------------|---------------------------------------------------------------------|
66
+ | 0 | `assignOp` | Could use `+=`, `-=`, `*=`, etc. |
67
+ | 1 | `builtinShadow` | Shadows a predeclared identifier. |
68
+ | 2 | `captLocal` | Local variable name begins with an uppercase letter. |
69
+ | 3 | `commentFormatting` | Comment is non‑idiomatic or badly formatted. |
70
+ | 4 | `elseif` | Nested `if` statement that can be replaced with `else-if`. |
71
+ | 5 | `ifElseChain` | Repeated `if-else` statements can be replaced with `switch`. |
72
+ | 6 | `paramTypeCombine` | Function parameter types that can be combined (e.g. `x, y int`). |
73
+ | 7 | `singleCaseSwitch` | Statement `switch` that could be better written as `if`. |
74
+
75
+ ## Splits
76
+
77
+ The dataset is partitioned into training, validation, and test subsets in a 70/10/20 ratio:
78
+
79
+ | Split | # Examples | Approx. % |
80
+ |---------------:|-----------:|----------:|
81
+ | **train** | 1536 | 70% |
82
+ | **validation** | 222 | 10% |
83
+ | **test** | 448 | 20% |
84
+