ArkTS is a core programming language in the OpenHarmony ecosystem, yet research on ArkTS code intelligence is hindered by the lack of public datasets and evaluation benchmarks. This paper presents a large-scale ArkTS dataset constructed from open-source repositories, targeting code retrieval and code evaluation tasks. We design a single-search task, where natural language comments are used to retrieve corresponding ArkTS functions. ArkTS repositories are crawled from GitHub and Gitee, and comment-function pairs are extracted using tree-sitter-arkts, followed by cross-platform deduplication and statistical analysis of ArkTS function types. We further evaluate existing open-source code embedding models on the single-search task and perform fine-tuning using both ArkTS and TypeScript training datasets, resulting in a high-performing model for ArkTS code understanding. This work establishes the first systematic benchmark for ArkTS code retrieval. Both the dataset and our fine-tuned model are available at https://huggingface.co/hreyulog/embedinggemma_arkts and https://huggingface.co/datasets/hreyulog/arkts-code-docstring .
翻译:ArkTS是OpenHarmony生态系统中的核心编程语言,然而由于缺乏公开数据集和评估基准,针对ArkTS代码智能的研究受到阻碍。本文提出了一个从开源仓库构建的大规模ArkTS数据集,面向代码检索与代码评估任务。我们设计了一项单查询检索任务,即使用自然语言注释来检索对应的ArkTS函数。通过从GitHub和Gitee爬取ArkTS仓库,并利用tree-sitter-arkts工具提取注释-函数对,随后进行跨平台去重及ArkTS函数类型的统计分析。我们进一步在单查询检索任务上评估了现有的开源代码嵌入模型,并同时使用ArkTS和TypeScript训练数据集进行微调,最终获得了一个在ArkTS代码理解方面表现优异的模型。本工作首次为ArkTS代码检索建立了系统性基准。数据集及微调模型均已发布于https://huggingface.co/hreyulog/embedinggemma_arkts 与 https://huggingface.co/datasets/hreyulog/arkts-code-docstring。