hreyulog commited on
Commit
0bdbf6b
·
verified ·
1 Parent(s): bc42ea0

Update Pro README with cleaning and license improvements

Browse files
Files changed (1) hide show
  1. README.md +106 -33
README.md CHANGED
@@ -1,33 +1,106 @@
1
- ---
2
- configs:
3
- - config_name: repo_split_balanced
4
- data_files:
5
- - split: train
6
- path: repo_split_balanced/train-*
7
- - split: validation
8
- path: repo_split_balanced/validation-*
9
- - split: test
10
- path: repo_split_balanced/test-*
11
- - config_name: random_shuffle
12
- data_files:
13
- - split: train
14
- path: random_shuffle/train-*
15
- - split: validation
16
- path: random_shuffle/validation-*
17
- - split: test
18
- path: random_shuffle/test-*
19
- task_categories:
20
- - text-retrieval
21
- language:
22
- - en
23
- - zh
24
- ---
25
-
26
- # ArkTS Code Docstring Pro
27
-
28
- This version contains open-source ArkTS function-comment pairs from repositories with more than zero stars. License/copyright headers and code-only documentation are removed. Documentation shorter than five characters is excluded.
29
-
30
- Queries and complete function texts are globally unique after cleaning.
31
-
32
- - `repo_split_balanced`: repository-isolated by normalized `nwo` across platforms and approximately 80%/10%/10% by example count.
33
- - `random_shuffle`: shuffled with seed `20260714` and split 80%/10%/10%.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ configs:
3
+ - config_name: repo_split_balanced
4
+ data_files:
5
+ - split: train
6
+ path: repo_split_balanced/train-*
7
+ - split: validation
8
+ path: repo_split_balanced/validation-*
9
+ - split: test
10
+ path: repo_split_balanced/test-*
11
+ - config_name: random_shuffle
12
+ data_files:
13
+ - split: train
14
+ path: random_shuffle/train-*
15
+ - split: validation
16
+ path: random_shuffle/validation-*
17
+ - split: test
18
+ path: random_shuffle/test-*
19
+ task_categories:
20
+ - text-retrieval
21
+ language:
22
+ - en
23
+ - zh
24
+ ---
25
+
26
+ # ArkTS-CodeSearch-Pro: A Cleaned and License-Aware ArkTS Dataset
27
+
28
+ [Original Dataset](https://huggingface.co/datasets/hreyulog/arkts-code-docstring) | [Pro Dataset](https://huggingface.co/datasets/hreyulog/arkts-code-docstring-pro) | [Paper](https://huggingface.co/papers/2602.05550) | [Evaluation Code](https://github.com/hreyulog/retrieval_eval) | [Dataset Processing Code](https://github.com/hreyulog/arkts-codesearch)
29
+
30
+ This dataset is an improved version of [ArkTS-CodeSearch](https://huggingface.co/datasets/hreyulog/arkts-code-docstring). It contains function-level information from ArkTS (`.ets`) projects, including function source code, docstrings, AST representations, and repository metadata. It is intended for code retrieval, code understanding, and AST-based research.
31
+
32
+ Compared with the original dataset, this Pro version provides the following improvements:
33
+
34
+ - **License-aware collection**: only repositories with locally identified open-source licenses are included. The supported license families include Apache-2.0, MIT, BSD, GPL, LGPL, and MPL.
35
+ - **Repository quality filtering**: only repositories with more than zero stars are retained.
36
+ - **Comment normalization**: comment delimiters such as `//`, `/*`, `*/`, and leading `*` are removed from the docstrings.
37
+ - **Noise removal**: copyright/license headers, code-only comments, and cleaned docstrings shorter than five characters are excluded.
38
+ - **Stronger deduplication**: complete function texts and cleaned queries are globally unique.
39
+ - **Repository-isolated evaluation**: `repo_split_balanced` groups repositories by normalized `nwo` across GitHub, Gitee, and GitCode, preventing the same cross-platform repository name from appearing in multiple splits.
40
+ - **Stable split sizes**: both configurations are approximately 80%/10%/10%.
41
+
42
+ The final dataset contains **31,164 examples**, all extracted from `.ets` files. The `sha` column was removed because commit SHA metadata was unavailable for most source repositories; `function_sha` is retained as a function-content identifier.
43
+
44
+ ## Dataset Structure
45
+
46
+ The dataset provides two configurations:
47
+
48
+ - `repo_split_balanced`: repository-level split with normalized `nwo` repository isolation. It contains 24,932 training, 3,116 validation, and 3,116 test examples.
49
+ - `random_shuffle`: globally shuffled split with seed `20260714`. It contains 24,931 training, 3,117 validation, and 3,116 test examples.
50
+
51
+ ## Features / Columns
52
+
53
+ | Field | Type | Description |
54
+ |-------|------|------------|
55
+ | `nwo` | string | Repository name |
56
+ | `path` | string | `.ets` file path |
57
+ | `language` | string | Programming language (`arkts`) |
58
+ | `identifier` | string | Function identifier / name |
59
+ | `docstring` | string | Cleaned, normalized function documentation |
60
+ | `function` | string | Original function source code |
61
+ | `ast_function` | string | AST representation generated with tree-sitter-arkts |
62
+ | `obf_function` | string | Legacy obfuscated-function field; currently equal to `function` |
63
+ | `url` | string | Repository or source-code URL when available |
64
+ | `function_sha` | string | Function-content identifier |
65
+ | `source` | string | Code source platform (GitHub / Gitee / GitCode) |
66
+
67
+ ## Usage
68
+
69
+ ```python
70
+ from datasets import load_dataset
71
+
72
+ # Repository-isolated configuration
73
+ dataset = load_dataset(
74
+ "hreyulog/arkts-code-docstring-pro",
75
+ name="repo_split_balanced",
76
+ )
77
+
78
+ # Random-shuffle configuration
79
+ random_dataset = load_dataset(
80
+ "hreyulog/arkts-code-docstring-pro",
81
+ name="random_shuffle",
82
+ )
83
+
84
+ print(dataset["train"][0])
85
+ print(dataset["train"].features)
86
+ ```
87
+
88
+ ### License Configuration
89
+
90
+ All included repositories were selected from locally identified open-source repositories. Users must still comply with the individual upstream repository licenses and attribution requirements. This Pro dataset does not grant a new license over the source code.
91
+
92
+ ## Citation
93
+
94
+ If you use this dataset in your research, please cite the following paper:
95
+
96
+ ```bibtex
97
+ @misc{he2026arktscodesearchopensourcearktsdataset,
98
+ title={ArkTS-CodeSearch: A Open-Source ArkTS Dataset for Code Retrieval},
99
+ author={Yulong He and Artem Ermakov and Sergey Kovalchuk and Artem Aliev and Dmitry Shalymov},
100
+ year={2026},
101
+ eprint={2602.05550},
102
+ archivePrefix={arXiv},
103
+ primaryClass={cs.SE},
104
+ url={https://arxiv.org/abs/2602.05550},
105
+ }
106
+ ```