遇见数据集

Multi Language Models for On-the-Fly Syntax Highlighting

收藏
Zenodo2025-10-05 更新2026-05-26 收录
官方服务:

资源简介:

Syntax highlighting is a critical feature in modern software development environments, enhancing code readability and developer productivity. However, delivering accurate highlighting in real-time remains intractable in online and web-based development tools due to strict time and memory constraints on backend services. These syntax highlighting systems must serve highlights rapidly and frequently, including in scenarios where code is only partially valid or entirely invalid. This has led to the concept of on-the-fly syntax highlighting, where visual annotations are generated just before content is served online, often at high request rates and under incomplete input conditions. To meet these demands efficiently, state-of-the-art models leverage Convolutional Neural Networks to automatically learn the behavior of brute-force syntax highlighting resolvers; tools that are easy for developers to implement but too slow for deployment. Through a process we refer to as Deep Abstraction, these brute-force strategies are encoded into fast, statistical models that offer both high accuracy and low-latency inference. Despite their success, such models still face key challenges: they are limited to supporting a single programming language per model, require the generation of large datasets via slow and inefficient brute-force generators, and involve long and resource-intensive training sessions. In multi-language environments, this leads to the need for maintaining and deploying multiple independent models, one per language, which increases system complexity and operational overhead. This work addresses these challenges by introducing a unified model capable of effectively highlighting up to six mainstream programming languages, thereby reducing deployment complexity by a factor of six and improving performance on previously unseen languages. A novel normalization technique is proposed, which significantly enhances model generalization to languages it has not been explicitly trained on. Furthermore, the study explores few-shot learning tasks aimed at reducing the cost of training syntax highlighting models. By relying on a small number of manually generated oracle samples instead of large datasets, this approach minimizes dependence on brute-force highlighters and reduces training effort. The proposed normalization step further boosts model accuracy under these constraints, paving the way for efficient, scalable, and cost-effective syntax highlighting across a wide range of programming languages

提供机构:
Zenodo
创建时间:
2025-10-05
二维码
社区交流群
二维码
科研交流群
商业服务