File size: 4,284 Bytes
922af02
 
 
708d2c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
922af02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
abd2eef
 
 
 
7dc0ede
922af02
8f3b67b
abd2eef
05cd86d
b10cf6c
 
13eea7b
 
8f3b67b
 
 
abd2eef
 
ae810f9
202d975
8f3b67b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
abd2eef
8f3b67b
 
 
 
 
 
9130789
8f3b67b
703e67f
 
 
 
 
 
 
 
 
abd2eef
0712d03
abd2eef
0712d03
 
5e30408
 
 
 
 
 
 
 
0712d03
abd2eef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
dataset_info:
  features:
  - name: nwo
    dtype: string
  - name: sha
    dtype: string
  - name: path
    dtype: string
  - name: language
    dtype: string
  - name: identifier
    dtype: string
  - name: docstring
    dtype: string
  - name: function
    dtype: string
  - name: ast_function
    dtype: string
  - name: obf_function
    dtype: string
  - name: url
    dtype: string
  - name: function_sha
    dtype: string
  - name: source
    dtype: string
  splits:
  - name: train
    num_bytes: 162123504
    num_examples: 19561
  - name: validation
    num_bytes: 18843858
    num_examples: 2445
  - name: test
    num_bytes: 19867797
    num_examples: 2446
  download_size: 42313088
  dataset_size: 200835159
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
task_categories:
- text-retrieval
language:
- en
- zh
---

# ArkTS-CodeSearch: A Open-Source ArkTS Dataset for Code Retrieval

[Paper](https://huggingface.co/papers/2602.05550) | [Evaluation Code](https://github.com/hreyulog/retrieval_eval) |[Dataset processing Code](https://github.com/hreyulog/arkts-codesearch) | [Fine-Tuned Model](https://huggingface.co/hreyulog/embedinggemma_arkts) | [Repository-Level Split](https://huggingface.co/datasets/hreyulog/arkts-code-docstring-resplit-by-repo) |




This dataset collects **function-level information from ArkTS (HarmonyOS Ark TypeScript) projects**, including original functions, docstrings, abstract syntax tree (AST) representations, obfuscated versions, and source code metadata. It is suitable for tasks such as code analysis, code understanding, AST research, and code search.

ArkTS is a core programming language in the OpenHarmony ecosystem. This dataset was constructed from open-source repositories crawled from GitHub and Gitee, targeting code retrieval and code evaluation tasks.

Note: ⚠️ Not Enterprise-Ready: This dataset is designed for research only. Some of the collected code may come from repositories without an explicit open-source license. Users should be aware that usage of such code may be subject to copyright restrictions.
![arktscodesearch](https://cdn-uploads.huggingface.co/production/uploads/653f6ec4e8ed050cb35d2dc9/OPMtZpOKAtXLDHgN5yh2L.jpeg)
## Dataset Structure

The dataset contains three splits:

- `train`: Training set
- `validation`: Validation set
- `test`: Test set

Each split is a **JSON Lines (.jsonl) file**, where each line is a JSON object representing a single function.

## Features / Columns

| Field | Type | Description |
|-------|------|------------|
| `nwo` | string | Repository name |
| `sha` | string | Commit SHA |
| `path` | string | File path |
| `language` | string | Programming language |
| `identifier` | string | Function identifier / name |
| `docstring` | string | Function docstring |
| `function` | string | Original function source code |
| `ast_function` | string | AST representation of the function |
| `obf_function` | string | Obfuscated function source code |
| `url` | string | URL to the code in the repository |
| `function_sha` | string | Function-level SHA |
| `source` | string | Code source (GitHub / Gitee) |

## Usage

```python
from datasets import load_dataset

# Load the dataset
dataset = load_dataset("hreyulog/arkts-code-docstring")

# Inspect the first training example
print(dataset["train"][0])

# Check dataset features
print(dataset["train"].features)
```

### Repo License Configuration

Contains repository license information from two sources:

- `github`: repos_license_github.jsonl
- `gitee`: repos_license_gitee.jsonl

Each line is a JSON object with repository metadata including source platform, repository name, license type, and URL.

## Citation

If you use this dataset in your research, please cite the following paper:

```bibtex
@misc{he2026arktscodesearchopensourcearktsdataset,
      title={ArkTS-CodeSearch: A Open-Source ArkTS Dataset for Code Retrieval}, 
      author={Yulong He and Artem Ermakov and Sergey Kovalchuk and Artem Aliev and Dmitry Shalymov},
      year={2026},
      eprint={2602.05550},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2602.05550}, 
}
```