S h UD : the First Shanghainese U niversal D ependency Treebank (2025)

Abstract: This paper introduces ShUD, the first Universal Dependencies (UD) treebank for Shanghainese, a Wu Chinese variant spoken by approximately 14 million people but severely under-resourced in NLP. The treebank is built through a scalable annotation pipeline that exploits grammatical parallels between Shanghainese and Mandarin. Our pipeline also provides a practical strategy for bootstrapping resources for other Chinese dialects. We documented syntactic phenomena unique to Shanghainese within the UD framework and fine-tuned a dependency parser using our annotated treebank, contributing a foundation to both NLP tool development and cross-linguistic syntactic research.

## introduction shanghainese, the largest branch of wu chinese spoken by about 14 million of the overall 83 million wu chinese speakers @xcite , remains severely under-resourced in computational linguistics -an issue common among non-mandarin chinese varieties. to date, no annotated corpora exist for shanghainese or any other wu chinese variety, in stark contrast to the growing availability of resources for mandarin. this lack of data hinders the development of nlp tools and limits linguistic research on shanghainese. in this paper, we introduce shud, the first ud treebank for shanghainese foot_2 . shud contains 983 sentences and 8,584 tokens. we design a sustainable annotation pipeline that leverages grammatical parallelism with mandarin to improve annotation efficiency and quality. our approach may extend to other chinese varieties exhibiting similar syntactic traits. we document shanghainesespecific constructions within the ud framework @xcite . we also fine-tune a biaffine dependency parser using our data. ## data source and features we use the open-source scripted chinese shanghai dialect daily-use speech corpus (asr-scshhidiadusc, hereafter a.-s.) as the data source for our treebank. the corpus focuses on daily-use speech, providing an accessible and representative sample of contemporary shanghainese foot_3 (magic data, 2021b). the a.-s. corpus contains 4.23 hours of transcribed shanghainese speech, totalling 4,819 utterances from 10 speakers. while originally created for speech processing, the corpus is well-suited for syntactic annotation. speakers read mandarin chinese prompts aloud in shanghainese, adapting vocabulary and structure naturally, which is the most common practice for native speakers to read the language from text in everyday life (due to the lack of standardised orthography and formal texts in shanghainese). given the high lexical overlap between the two languages in colloquial contexts, such adaptations produce fluent shanghainese expressions rather than literal translations. since shanghainese is primarily used in colloquial contexts, the corpus is particularly well-suited to represent the language, and sentences are typically short. we use only the textual transcriptions for our annotation. an example instance from the dataset is shown below: transcription 搿眼机会啊可能没了。 foot_5 [shanghainese] (geh ngae ci ue a khu nen meh leh) 7 gloss this bit chance also possible no. translation there may not be any chance of this. ## annotation guideline this section outlines the principles and guidelines followed in the annotation process. ## statistics and pipeline evaluation statistics of the treebank. the current treebank contains 983 sentences with 8,584 tokens. an example in conll-u format can be found in appendix b. more sentences will be annotated in the next ud release. ## model fine-tuning we fine-tune a graph-based dependency parser on our annotated treebank using supar foot_8 's implementation @xcite of the biaffinebased dependency parser by @xcite . the model couples a biaffine scorer over head-dependent hidden states with xlm-roberta-large, the pretrained multilingual model, as the contextual encoder. we trained the model over 50 epochs with adamw at a base learning rate of 5 × 10 -5 with 10% warm-up, 20× scheduled decay, and gradient clip of 5. batches are formed by sentence length bucketing with a maximum of 5,000 tokens per update and a 20-token fixed positional window. the treebank is randomly split into train, dev, and test with ratio of 80% (786 sentences), 10% (98 sentences), and 10% (99 sentences), respectively. at the final checkpoint, the model reaches uas of 75.61 and las of 64.91. the fine-tuned parser shows strong capacity in learning a robust representational foundation and significantly outperforms stanza's mandarin parser without manual correction. however, its capability in generalisation to unseen data is still limited, possibly due to the small size of training data. appendix d shows more details of training. ## conclusion and future work in this paper, we present the first ud treebank for shanghainese, named shud. we propose a scalable annotation pipeline that leverages the strong performance of existing parsers and the substantial syntactic overlap between shanghainese and mandarin chinese. we also fine-tuned a dependency parser and achieved considerable parsing accuracy. our parser could serve as a primitive foundation for future annotations and further automate the pipeline to reduce reliance on mandarin parsers. the treebank is still limited by its size and genre, with current data source solely based on scripted speech in everyday context. in future work, we plan to extend the treebank, by more annotations and possible expansions to social media text, written literature, news podcasts, etc., to develop more accurate models. universal morphological features, beyond syntactic dependencies, can also be added to better support downstream tasks. take the sentence in figure 6 as an example. the tokenisation and upos tagging are unanimous. however, when it comes to understanding the sentence, there could be a deviation. the sentence could be treated as a complete sentence, where the word 下趟 gho thaon "next time" is treated as the subject; it would have a nsubj dependency with the root. on the other hand, in a colloquial context, it could also be interpreted as a sentence omitting its subject, probably "i"; in this case, the word would be a temporal noun and has a nmod dependency with the root. this is shown in figure 7 .